Admin Preview Not Updating Even After Save and Cache Clear

Hi Grav community,

I’m running a Grav CMS site locally for a nonprofit project on Ubuntu 22.04, with the Admin Dashboard accessible at http://192.168.193.106/admin. I’ve run into a consistent issue with the Admin Preview not reflecting edits:

Behavior:

  • I edit a page using the Admin editor and click Save.
  • The edit is correctly stored and visible when I later visit the page manually in a browser.
  • I then click the Clear Cache button (using the Admin Power Tools plugin).
  • When I click Preview from the Admin panel, it still shows the old version of the page.
  • Even opening the preview in a new tab or refreshing it doesn’t help.
  • However, running sudo bin/grav clear-cache from the terminal does force the Preview to update.

So far I’ve tried:

  • Confirming that Twig cache is enabled (twig.cache: true)
  • Installing and using Admin Power Tools
  • Confirming edits are saved correctly and show on the frontend after CLI-based cache clears
  • Tested with FireFox browser.

This only affects the Preview inside the Admin panel — not the site itself.
Also worth noting:

When browsing to http://ponyxps.com, all edited pages load correctly after a refresh or after clearing cache.

However, each page takes 3–5 seconds to render, possibly due to caching being disabled (twig.cache: false) or slow template recompilation.

Preview within the Admin still shows old content until cache is cleared via CLI.

Question:

  • Is this a known issue or expected behavior of Grav Admin’s Preview iframe?
  • Is there a reliable way to clear the preview cache specifically when saving a page?
  • I do not like it, but : Would a custom plugin hooking into onAdminSave and calling clearCache() be the best solution? (I would much rather have it just work.)

Thanks in advance!
Richard

@Rider,

  • I then click the Clear Cache button (using the Admin Power Tools plugin).

See what happens when you remove plugin “Admin Power Tools” and its dependency “Core Service Manager”.

The plugin is 7 years old and according an old Admin issue, it is strongly advised by the lead developer of Grav to not use it:

BTW, it’s quite likely that all these errors stem from the “admin-power-tools” plugin which is a 3rd party plugin that has not been updated since 2019 and we dont’ recommend using as it messes with the core admin plugin.

Probably removing that plugn plus any of it’s associated plugins would solve your messages issue.