Skip to content
  • David König's avatar
    [BUGFIX] Correctly evaluate "unique" eval for slug fields · f1a8ae98
    David König authored and Helmut Hummel's avatar Helmut Hummel committed
    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>
    f1a8ae98