[BUGFIX] Deduplicate slugs with language -1
Checking for duplicate slugs in DataHandler will now make sure that no two fields with the same slug exist, where one of them has a language of -1. Existing records are not migrated. This could be done in a followup patch or with a community extension. When new records are created or changed which have a field of type "slug", a unique handling ensures that no records exists with the same slug (depending on the additional settings "unique", "uniqueInSite" and "uniqueInPid"). The language is considered as well: Records with the same slug can exist if the language differs. But language -1 was not considered previously. Since -1 means all language, no other record with the same slug should exist in ANY language if a record with language -1 exists. Resolves: #99529 Releases: main, 11.5 Change-Id: I919c3a3954df02cd55c701c480f6c1a8c87d84d5 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77407 Tested-by:Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
core-ci <typo3@b13.com>
Showing
- typo3/sysext/core/Classes/DataHandling/SlugHelper.php 18 additions, 6 deletionstypo3/sysext/core/Classes/DataHandling/SlugHelper.php
- typo3/sysext/core/Tests/Functional/DataHandling/Slug/DataSet/TestSlugUniqueWithLanguages.csv 6 additions, 0 deletions...DataHandling/Slug/DataSet/TestSlugUniqueWithLanguages.csv
- typo3/sysext/core/Tests/Functional/DataHandling/Slug/DataSet/TestSlugUniqueWithLanguagesResult.csv 4 additions, 0 deletions...ndling/Slug/DataSet/TestSlugUniqueWithLanguagesResult.csv
- typo3/sysext/core/Tests/Functional/DataHandling/Slug/SlugHelperUniqueWithLanguageTest.php 115 additions, 0 deletions...al/DataHandling/Slug/SlugHelperUniqueWithLanguageTest.php
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_datahandler_slug/Configuration/TCA/tx_testdatahandler_slug.php 90 additions, 0 deletions...andler_slug/Configuration/TCA/tx_testdatahandler_slug.php
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_datahandler_slug/ext_emconf.php 19 additions, 0 deletions.../Fixtures/Extensions/test_datahandler_slug/ext_emconf.php
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_datahandler_slug/ext_tables.sql 9 additions, 0 deletions.../Fixtures/Extensions/test_datahandler_slug/ext_tables.sql
Please register or sign in to comment