Skip to content

[6.x] Fix stale Stache entry order when reordering structured collection#14896

Open
joshuablum wants to merge 2 commits into
6.xfrom
fix-structured-collection-reordering
Open

[6.x] Fix stale Stache entry order when reordering structured collection#14896
joshuablum wants to merge 2 commits into
6.xfrom
fix-structured-collection-reordering

Conversation

@joshuablum

Copy link
Copy Markdown
Member

When in a structured collection with nested entries, reordering a parent entry from within the CP updates the tree correctly but on the frontend only the parent appears to move while its children keep their old positions until the Stache is manually cleared.

When a tree is saved UpdateStructuredEntryOrderAndParent only refreshed the order index for the IDs in CollectionTreeDiff::moved(). That excludes children of a moved parent so when a parent moved, its children's position shifted but their cached order was never updated leaving them stale until you cleared the Stache.

This refreshes the order index and expands it to include each moved entry's tree descendants.

Thanks to Ash for reporting it through support.

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