Skip to content

Fix test failure from CascadeTest#553

Merged
duncanmcclean merged 2 commits into7.xfrom
fix/cascade-test-tree-cleanup
May 5, 2026
Merged

Fix test failure from CascadeTest#553
duncanmcclean merged 2 commits into7.xfrom
fix/cascade-test-tree-cleanup

Conversation

@duncanmcclean
Copy link
Copy Markdown
Member

@duncanmcclean duncanmcclean commented May 5, 2026

This pull request fixes an issue where the it_generates_seo_cascade_without_exception_when_no_home_entry_exists test was failing when running against statamic/cms v6.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('/') returned null. 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.

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>
@duncanmcclean duncanmcclean changed the title Fix CascadeTest failing with statamic/cms v6.15+ Fix test failure from CascadeTest May 5, 2026
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>
@duncanmcclean duncanmcclean merged commit a2fab5e into 7.x May 5, 2026
14 checks passed
@duncanmcclean duncanmcclean deleted the fix/cascade-test-tree-cleanup branch May 5, 2026 08:07
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