Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Sitewide Forms and caching

Solved by Fabian Saur View solution

Started by Fabian Saur 8 years ago · 1 replies · 540 views
8 years ago

Hi everyone, I'm pretty new to Grav and just "finished" our first Grav site. We have a form on every page that loads in a lightbox thingy, linked from the main nav. I linked the site here: /forum/showcase/sample-grav-sites-part-ii-t7213?u=fabbow . From there, when you click "Request a demo" in the main nav, it opens. The form is an invisible, unroutable page without parents and one child (the "success" page). I use a partial that loads the forms page, and renders heading, content and the form like this {% include "forms/form.html.twig" with { form: forms('request-demo-form') } %}

So here's the problem: The form disappeared after some time when I used caching (the box then just displayed the heading and content) and I couldn't figure out why, or even a pattern. I tried disabling Twig caching globally to no luck, the only thing that got it working was disabling Caching itself. The site still runs pretty fast but caching removes those sweet 10-20ms from the server response so I'd appreciate any input here :)

last edited 06/01/18 by Fabian Saur
8 years ago Solution

...the Server had an active APCu module and my cache driver was set to auto, now everything makes a bit more sense. Using "file" seems to have fixed this.

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 53 10 hours ago
Support · by Anna, 3 days ago
2 60 13 hours ago
Support · by Justin Young, 14 hours ago
1 30 14 hours ago
Support · by Duc , 1 week ago
2 65 5 days ago
Support · by Colin Hume, 1 week ago
2 56 5 days ago