Skip to content

[6.x] Invalidate moved entries' new URLs when a collection tree is saved - #15361

Merged
jasonvarga merged 1 commit into
6.xfrom
invalidate-moved-entry-urls
Sep 11, 2026
Merged

[6.x] Invalidate moved entries' new URLs when a collection tree is saved#15361
jasonvarga merged 1 commit into
6.xfrom
invalidate-moved-entry-urls

Conversation

@duncanmcclean

Copy link
Copy Markdown
Member

This pull request fixes an issue where a statically cached 404 would keep being served after the collection tree was changed so that the URL became valid. For example, with half-measure static caching, visiting /parent/child while both pages are top level caches a 404, and moving child below parent in the tree leaves that 404 in place.

This was happening because #14386 only invalidates the URLs moved entries are leaving behind, which is done during CollectionTreeSaving while the old URLs can still be resolved. Nothing invalidated the URLs the entries are moving to, so any cached 404 at the new URL stuck around.

This PR fixes it by having the invalidator also invalidate the URLs of any entries whose ancestry changed when the tree is saved. By the time the CollectionTreeSaved event is handled, the entry URIs have already been updated, so the new URLs resolve correctly.

Fixes #10758

@jasonvarga
jasonvarga merged commit 57fabf8 into 6.x Sep 11, 2026
65 checks passed
@jasonvarga
jasonvarga deleted the invalidate-moved-entry-urls branch September 11, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

404 errors are cached with »half« static caching

2 participants