Skip to content

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

Open
duncanmcclean wants to merge 1 commit into
6.xfrom
invalidate-moved-entry-urls
Open

[6.x] Invalidate moved entries' new URLs when a collection tree is saved#15361
duncanmcclean wants to merge 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

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

1 participant