Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

user/config/media.yaml #943

Closed
ritchiedalto opened this issue Jul 17, 2016 · 3 comments
Closed

user/config/media.yaml #943

ritchiedalto opened this issue Jul 17, 2016 · 3 comments

Comments

@ritchiedalto
Copy link

After the upgrade to 1.1.1, a custom plugin that I wrote stopped working. It pulls in an attached .csv file and does some stuff with the data. When I set this up I had to put...

csv:
  type: file
  thumb: media/thumb-xml.png
  mime: text/css

...in the user/config/media.yaml file for it to allow dropping of a .csv file onto a page in the media section. After this upgrade my plugin stopped working, I checked the user/config/media.yaml file and the above settings were in there. But in the admin ui, on the media tab, there was no entry for .csv So I entered one there in the UI, saved, and my plugin worked again. The entry still exists in user/config/media.yaml just the same as before.

Forgive the insanity of attaching this image, but I didnt know how to give you the diff as text. This shows the media.yaml file after upgrade to 1.1.1 compared with after I added the .csv settings via the Admin UI.

media-yaml-grav-git-diff

Thought I'd mention this, I'm thinking it's a bug to break stuff like this, and someone else might need to know this info.

@rhukster
Copy link
Member

We did change the media array to be nested under types: due to other issues that needed this fix to resolve. Your saved file looks strange though, so there may be a bug with how new media types are saved. I will look at this soon.

@rhukster rhukster added the bug label Jul 18, 2016
@flaviocopes
Copy link
Contributor

The media.yaml file was saved correctly as the types yaml object was added, and the old media objects are still there, but now unused, as Andy says, the structure changed and this is a backwards incompatible change which was introduced to solve another issue.

Maybe we could have some logic to overcome this BI change, and merge the existing media information but this would probably cause more issues than the ones it's solving

@rhukster
Copy link
Member

rhukster commented Sep 2, 2016

Not sure if it's possible, i will investigate when i get a chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants