cms icon indicating copy to clipboard operation
cms copied to clipboard

Updating a parent page's slug makes child pages inaccessible

Open jacksleight opened this issue 1 year ago • 0 comments

Bug description

If you update a parent page's slug you can then access it at the new path, but you can't access any child pages at either their old or new paths. ~It looks as though Statamic is correctly removing the old paths from the index, but not adding the new ones. Maybe?~ The stache URI index isn't being updated, the child pages still have the old paths. The entry will be fetched from the repo at the old URI, however there's then an additional URI check that fails.

How to reproduce

Create a page structure like this:

/parent
/parent/child

Change the parent page's slug to parent-2.

You can now access the parent page at /parent-2, but you cannot access the child page at either /parent-2/child or /parent/child, they both 404.

Manually clear the cache and the new paths will now work.

Logs

No response

Environment

Statamic
Addons: 0
Antlers: runtime
Stache Watcher: Disabled
Static Caching: Disabled
Version: 4.47.0 Solo

Installation

Fresh statamic/statamic site via CLI

Antlers Parser

None

Additional details

No response

jacksleight avatar Feb 01 '24 16:02 jacksleight