-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
media objects disappear after a reload #1545
Comments
Ok, a point of confusion here that is probably to blame. There's a So if you access However, there's also a a
|
Ooh, ok this make sense. But I am unable to get the image to show up at all if I change it to a media function though. And I did get my info and that snippet from the docs: https://learn.getgrav.org/themes/theme-vars#media-object So maybe its wrong there too? |
Well, i can reproduce the issue so i'm going to dig in! |
@mahagr any ideas on this one.. seems the Twig is just losing all reference to this once cached... |
This seems to be a hard one. The entry that causes this issue is the doctrine cached item for |
Found it out. Media object was serialized, but unserialization was incomplete. |
Awesome that you guys were able to find the bug! Getting back to my question about the docs, is it correct to use |
The docs are correct. I renamed the |
How
|
So, I recently learned about the global media object and tried to use it to pull images from my theme and found a bug in it. I'm not sure if I'm using it wrong or what the deal is. But here are repeatable steps you can do to reproduce it, I just tested this out on a clean develop branch.
templates/default.html.twig
like so:The text was updated successfully, but these errors were encountered: