Description
Bug description
When moving (= changing parent page) or removing a page, its statically cached version remains intact. So after moving or removing a page, one can still visit its frontend URL and view it.
In case of moving a page, when an editor has the frontend of the page open on its old URL, changes suddenly stop appearing in the frontend of the page after moving it. That's rather confusing. I believe it can also cause duplicate content issues.
In case of deleting a page, it's not ideal if the page is still around in the frontend of the site after it's deleted.
I'd expect getting a 404 in both cases. When an entry is moved or deleted, it would be nice if the corresponding static cache file(s) would automatically be deleted 🙂
I'll be out on holiday for the coming week, so it might take me a while to respond if there are any additional questions.
How to reproduce
For moving pages:
- Turn on static caching (in my case, half measure static caching)
- Create a page
- Add some content
- Visit the page URL and keep it open
- Change the page's parent and save the page
- Change the page's content and save again
- Refresh the frontend of the page that was already open. Changes do not come through, nor do you get a 404.
For deleting pages:
- Turn on static caching again
- Create a page
- Visit the page URL, keep it open
- Delete the page
- Refresh the page frontend; it will still show up.
Logs
No response
Environment
Environment
Application Name: {site name}
Laravel Version: 10.26.2
PHP Version: 8.2.15
Composer Version: 2.7.1
Environment: production
Debug Mode: OFF
URL: {site url}
Maintenance Mode: OFF
Cache
Config: CACHED
Events: NOT CACHED
Routes: CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: statamic
Database: mysql
Logs: stack / single
Mail: postmark
Queue: sync
Session: file
Statamic
Addons: 2
Antlers: runtime
Stache Watcher: Enabled
Static Caching: half
Version: 4.42.1 PRO
Statamic Addons
ddm-studio/cookie-byte: 1.4.3
stoffelio/statamic-turnstile: 1.1.0
Installation
Fresh statamic/statamic site via CLI
Antlers Parser
Runtime (default)
Additional details
No response