Task #93294
openImprove automatic slug handling
0%
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.
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.
Files