Project

General

Profile

Actions

Bug #94003

open

Automatic update of subpages slugs not working for copy of subtree

Added by Stefan Terborg almost 3 years ago. Updated almost 3 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2021-04-28
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.


Related issues 2 (2 open0 closed)

Related to TYPO3 Core - Bug #94004: Automatic update of subpages slugs ignores columnsOverridesNew2021-04-28

Actions
Related to TYPO3 Core - Task #89301: Streamline automatic slug & redirects handlingAccepted2019-09-29

Actions
Actions #1

Updated by Stefan Terborg almost 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

Actions #2

Updated by Riccardo De Contardi almost 3 years ago

  • Category set to Link Handling, Site Handling & Routing
Actions #3

Updated by Sybille Peters almost 3 years ago

  • Related to Bug #94004: Automatic update of subpages slugs ignores columnsOverrides added
Actions #4

Updated by Sybille Peters almost 3 years ago

  • Related to Task #89301: Streamline automatic slug & redirects handling added
Actions

Also available in: Atom PDF