#93294Improve automatic slug handling
Description
The automatic slug updater introduced in #89115 has some backdraws that could be improved.
Reduce amount of selected pages
When the slug of a page changes, the automatic slug updater recursively tries to rename the slugs of all subpages.
To determine all subpages of a page, the process uses SlugService::resolveSubPages(). The select query in this function is too broad and selects besides regular pages (doktype = 1) also sys_folders, mount points, etc.
The query does also not respect nested sites, so unwanted changes on slugs in subsites may be processed under certain conditions as shown on the following screenshot.
slug-renaming.png
If the slug of the first page “Level 1” (Site1) changes, also the slug of the page “Level 1” (Subsite) will be renamed which is unintended.
Performance improvement
On large TYPO3 websites with ten thousands of pages the function SlugService::resolveSubPages() may lead to performance/PHP memory limit problems if the slug of a page changes and the page has thousands or even ten thousands of subpages.
Improve documentation
It is not really clear how the automatic slug update process works. It should be mentioned in the documentation, that slugs of subpages only will be changed, if the slug value starts with the exact value of the renamed parent slug.
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
-
[TASK] Improve automatic slug handling Resolves: #93294 Releases: main