Review main Merged

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

K�nig David CR +2 V +2 Normal +144 −0 updated 05/13/20, 09:41

Commit message

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.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 6