Fix test failure from CascadeTest#553
Merged
duncanmcclean merged 2 commits into7.xfrom May 5, 2026
Merged
Conversation
The `it_generates_seo_cascade_without_exception_when_no_home_entry_exists`
test was failing because statamic/cms v6.15+ properly recalculates URIs
after entry deletion. Previously, deleting the root entry left the URI
cache stale, so `Entry::findByUri('/')` returned null. Now, the next
entry in the tree correctly takes over as root. Clearing the tree
structure ensures no entry inherits the `/` URI.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CascadeTest
Clearing the tree structure alone wasn't enough since the Stache URI index still resolves. Deleting all entries in the collection ensures nothing can take over as root at `/`. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request fixes an issue where the
it_generates_seo_cascade_without_exception_when_no_home_entry_existstest was failing when running againststatamic/cmsv6.15+.This was happening because statamic/cms v6.15 fixed URI recalculation for structured collections (statamic/cms#14547, statamic/cms#14564). Previously, deleting the root entry left the URI cache stale, so
Entry::findByUri('/')returnednull. Now, URIs are properly recalculated after deletion, causing the next entry in the tree to inherit the/URI.This PR fixes it by also deleting all entries in the collection so nothing can take over as root.