Bug #94003
openAutomatic update of subpages slugs not working for copy of subtree
0%
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.
Updated by Stefan Terborg over 3 years ago
Maybe it would be more consistent if the slugs of the copied subpages would be changed according to the change of the copied parent page.
At the moment you have the following behaviour:
Original page tree slugs:
* rootline/parent-page * rootline/parent-page/child-page * rootline/parent-page/another-child-page
Copied page tree slugs:
* rootline/parent-page-1 * rootline/parent-page/child-page-1 * rootline/parent-page/another-child-page-1
Which causes the problem as the parent page slug is changed only for the parent page.
Maybe it would be better to change the parent page part of the slug for the copied subpages:
* rootline/parent-page-1 * rootline/parent-page-1/child-page * rootline/parent-page-1/another-child-page
Updated by Riccardo De Contardi over 3 years ago
- Category set to Site Handling, Site Sets & Routing
Updated by Sybille Peters over 3 years ago
- Related to Bug #94004: Automatic update of subpages slugs ignores columnsOverrides added
Updated by Sybille Peters over 3 years ago
- Related to Task #89301: Streamline automatic slug & redirects handling added