Skip to content

[6.x] Update mounted collection URIs when the mount's URI changes via its parent or tree - #15908

Draft
edalzell wants to merge 1 commit into
statamic:6.xfrom
edalzell:fix/mounted-uris-on-ancestor-change
Draft

edalzell wants to merge 1 commit into
statamic:6.xfrom
edalzell:fix/mounted-uris-on-ancestor-change

Conversation

@edalzell

Copy link
Copy Markdown
Contributor

Entries in a mounted collection only got new URIs when the mount entry itself was saved. If the mount's URI changed any other way (a parent's slug changed, or it was moved in the tree), the mounted entries kept their old URIs, e.g. /about/blog/one still resolved and /info/blog/one 404'd until the Stache was rebuilt. That's the "mount randomly missing / URLs change after a while" behaviour in the later comments on #3625.

Collection::updateEntryUris() now also updates any collection mounted on one of the updated entries, so every path that refreshes structured URIs (child page updates, tree saves, tree file changes) cascades. Ids are compared by root, since a tree save passes localization ids while the mount is stored as the origin.

This branch has not been deployed

No deployments
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.

1 participant