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

Gallery style is lost when the page is reloaded #2

Closed
beamaria opened this issue Feb 8, 2021 · 7 comments
Closed

Gallery style is lost when the page is reloaded #2

beamaria opened this issue Feb 8, 2021 · 7 comments
Labels
bug Something isn't working

Comments

@beamaria
Copy link

beamaria commented Feb 8, 2021

Update: i found the problem: cache in frontmatter must be disabled

I like your beautiful - and easy to implement!! - gallery. Just a strange behaviour: when you create the gallery and see it in the preview everything is working fine, but as soon as you reload the page you have all the images displayed in a list. The only way to have the correct display back is to clean the cache in GPM.
Working in local environment with the latest version of Grav and admin panel (updated today)

before
after

@sal0max
Copy link
Owner

sal0max commented Feb 9, 2021

Thanks a lot for opening this issue. I didn't run into the problem, as I had page caching disabled. Good catch!

Seems like the problem is known: https://discourse.getgrav.org/t/plugins-and-caching/6795/9
However, there also seems to be no real solution to the issue. Just some hacky workarounds.

I will see what I can do to remedy this situation.

@sal0max sal0max added the bug Something isn't working label Feb 9, 2021
@sal0max
Copy link
Owner

sal0max commented Feb 9, 2021

Fixed in c743188.
An update should soon be available via the admin panel.

Please verify the fix and close this issue, if it worked.

@sal0max
Copy link
Owner

sal0max commented Feb 24, 2021

Did you find some time to test the updated version, @beamaria ? 😗

@beamaria
Copy link
Author

Sorry, the issue is still there; if you don't disable the cache, the pictures are stacked...

@sal0max
Copy link
Owner

sal0max commented Feb 24, 2021

Mh, which version of the plugin do you use?
I can't replicate the issue.

@beamaria
Copy link
Author

beamaria commented Feb 25, 2021 via email

@sal0max
Copy link
Owner

sal0max commented Feb 25, 2021

Alright, that helps. :)

There are two Cache settings:

  1. Configuration / System / Caching / Caching
  2. Pages / <Page> / Advanced / Caching
    This sets cache_enable: true in a pages frontmatter and has to be set for every page.

If only the first is set enabled, there's no problem since after my fix.
However, if both caching options are enabled, I can replicate the behavior. Thanks for the clarification.


I couldn't find a way to overwrite the second configuration. However, I don't think that is a real issue.
The cache enabling is done actively by an user.

So.. as I can't find a way to remedy this scenario, and the behavior only happens if a user manually enables caching on a page (which probably is rare), I will close this issue for now.

If someone else has an idea, be welcome to comment here.

@sal0max sal0max closed this as completed Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants