craftcms / craftcms/cms

[5.x]: Nested entry URLs aren't updated when owner's slug changes

Open
#17,778 2 comments 2 reactions 1 assignee View on GitHub

@brandonkelly is already working on this.

Since Sep 2, 2025.

bug
Dominant language
PHP
Stars
3.6k
Forks
705
Avg merge
1d 5h
Merged PRs (30d)
134

Description

What happened?
Description

An entry contains a matrix field where the nested entries have public URLs. The entry URI format looks like {owner.uri}/{slug} Changing the slug on the parent entry and re-saving does not update the URL of the nested entries.

Steps to reproduce
  1. Create a section with a URL structure like test-section/{slug}.
  2. Create a matrix field on the section entry type with a URL pattern of {owner.uri}/{slug}
  3. Create a new entry with multiple nested entries. The URL structure of the entry and children will look something like this:

Parent Entry: https://msa.ddev.site/test-section/entry-with-nested-blocks

Nested block 1 - https://msa.ddev.site/test-section/entry-with-nested-blocks/nested-block-1
Nested block 2 - https://msa.ddev.site/test-section/entry-with-nested-blocks/nested-block-2
Nested block 3 - https://msa.ddev.site/test-section/entry-with-nested-blocks/nested-block-3

  1. Update the slug of the parent entry and resave. The URL structure now looks like this:

Parent Entry: https://msa.ddev.site/test-section/entry-with-changed-title-and-slug

Nested block 1 - https://msa.ddev.site/test-section/entry-with-nested-blocks/nested-block-1
Nested block 2 - https://msa.ddev.site/test-section/entry-with-nested-blocks/nested-block-2
Nested block 3 - https://msa.ddev.site/test-section/entry-with-nested-blocks/nested-block-3

Expected behavior

The nested entries URLs should be updated as well. This can be prompted with craft resave/entries.

Craft CMS version

5.8.15

PHP version

8.3

Operating system and version

DDEV ubuntu 24

Database type and version

MySQL 8.0.40

Image driver and version

No response

Installed plugins and versions

Performed with safe mode enabled.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.