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
Updated by Torben Hansen almost 4 years ago
- Related to Task #89301: Streamline automatic slug & redirects handling added
Updated by Sybille Peters over 3 years ago
Added relation to #88570 (document redirects) because of the documentation aspect.
AFAIK we do not have documentation for the automatic Slug changing at all, except for the changelog: https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/10.1/Feature-89115-Auto-createRedirectsOnSlugChanges.html
Updated by Sybille Peters over 3 years ago
- Related to Task #88570: Documentation is missing for new system extension "redirects" added
Updated by Stefan Terborg over 3 years ago
Another problem:
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.
Updated by Oliver Hader about 2 years ago
- Sprint Focus set to On Location Sprint
Updated by Philipp Idler 3 months ago
We run in php memory limit errors (mentioned by @Torben Hansen) by renaming a slug with approximately 400 nested subpages .
We could avoid it by turning off autoUpdateSlugs:
settings:
redirects:
autoUpdateSlugs: false
But thats not a suitable solution.