Skip to content
Snippets Groups Projects
Commit f1a8ae98 authored by David König's avatar David König Committed by Helmut Hummel
Browse files

[BUGFIX] Correctly evaluate "unique" eval for slug fields

TYPO3 v9.5.16, fixed functionality for URL resolving
for records with slug fields defined as "uniqueInSite".
With such setting, it is important to limit URL resolving
to the site the slugs are generated for. Because we currently
don't support records to be stored within one site, but
generating slugs for another one, this change enforced the storage
of news records to be in the same site as the detail page.

This however led to not working installations, where a record storage
folder is available in a site where other sites are fetching this
information from, which is a quite common use case.

To cover such use case, TCA needs to be adapted to the existing configuration
eval=unique, which diables the site check in URL frontend resolving.
However the current implementation of DataHandler only checks uniqueness
of fields of type "input".

This means for slug fields, the functionality of 'unique'
is currently not taken into account when generating the slug,
which can lead to duplicate slugs.
To fix this problem, a check for the unique eval setting is added to
DataHandler and FormSlugAjaxController. SlugHelper is adapted
to correctly generate slugs for this use case.

Resolves: #91235
Releases: master, 9.5
Change-Id: Id6e5c1d27860b09604787132f2cd83976418baa4
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64428


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarHelmut Hummel <typo3@helhum.io>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarHenrik Ziegenhain <henrik@ziegenhain.me>
Reviewed-by: default avatarHelmut Hummel <typo3@helhum.io>
parent 67f1f68f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment