Issue Bug New Orphaned

#94003Automatic update of subpages slugs not working for copy of subtree

Stefan Terborg 04/28/21, 07:07 updated 04/28/21, 22:01

Description

The slug updater for subpages checks if the old slug of the parent page is part of the slug of the child pages. Otherwise no slug update is performed.
When you copy a page (parent-page) with subpages, the slug of the copied parent page is immediately changed (parent-page-1) thus the slug checks for the copied child pages (parent-page/child-page) fail.

Code in TYPO3\CMS\Redirects\Service\SlugService L264:

protected function updateSlug(array $subPageRecord, string $oldSlugOfParentPage, string $newSlugOfParentPage): ?string
    {
        if (strpos($subPageRecord['slug'], $oldSlugOfParentPage) !== 0) {
            return null;
        }
...

The check should work for copied pages as well.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

Fix this issue

Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch

Commit message
[BUGFIX] Automatic update of subpages slugs not working for copy of subtree Resolves: #94003 Releases: main