#106152Restoring records does not check for valid slugs
Description
Problem/Description
> TL;DR: Restoring pages can result in pages with duplicate url slugs
TYPO3 does not check for any resulting inconsistencies of record slugs. The datahandler is is used to undo / restore records but is NOT using \TYPO3\CMS\Core\DataHandling\DataHandler::fixUniqueInSiteForSubpages method to verify and update restored slugs.
how to reproduce (simple example)
1. Create a pagetree
site/subpage/subpage
2. delete subpage in first level
site/subpage and childrens
3. create a new page with slug site/subpage
4. restore the previously deleted pages
with activated recursive restore checkbox
5. you have now to pages with the same slug site/subpage
ToDo(s)
- Restored records (just pages or also any record with a defined slug field??) must have a consistent unique (site or whole TYPO3 instance wide) slug.
- The backend user needs to be informed about the slug inconsistence and the changed records
Acceptance Criteria
A restored records must not have a conflicting slug in general
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
-
[BUGFIX] Restoring records does not check for valid slugs Resolves: #106152 Releases: main
History 7
-
Josef Glatz changed description TYPO3 Version
1312 <span data-processor="relativetime" data-value="2025-02-11T11:49:36+00:00" > 02/11/25, 11:49 </span> -
Josef Glatz changed description <span data-processor="relativetime" data-value="2025-02-11T11:50:49+00:00" > 02/11/25, 11:50 </span>
-
Josef Glatz changed priority
Should haveMust have <span data-processor="relativetime" data-value="2025-02-11T12:38:04+00:00" > 02/11/25, 12:38 </span> -
Georg Ringer changed category Tags
datahandler, slug, integritydatahandler, slug, integrity, recycler <span data-processor="relativetime" data-value="2025-02-11T12:41:25+00:00" > 02/11/25, 12:41 </span> -
Christian Kuhn commented <span data-processor="relativetime" data-value="2025-06-04T19:01:40+00:00" > 06/04/25, 19:01 </span>
-
Josef Glatz changed TYPO3 Version
1213 <span data-processor="relativetime" data-value="2026-01-03T06:56:32+00:00" > 01/03/26, 06:56 </span> -
Josef Glatz changed description <span data-processor="relativetime" data-value="2026-01-03T06:58:27+00:00" > 01/03/26, 06:58 </span>
the main problem with ‘undelete’ in recycler is bigger: there are a couple of other issues related to undelete already and i think nothing has been fixed in this area for years. the general current behavior is completely undefined since it has absolutely zero test coverage by now.
i recently worked on delete and hard-delete (hard-delete is recycler as well) and had to establish basic coverage as well, first. after that and a couple of datahandler refactoring patches, i was able to fix a whole bunch of issues and i’m quite confident by now that most of it works well now. we’ll have to do the same for undelete.
is anyone willing to step in and create basic coverage for undelete? feel free to ping me, i’ll be happy to add guidance and reviews. sidenote: “rollback” in history module is a huge playground as well and suffers from lack of test coverage, which is why not too much has been improved either.