Issue Bug Resolved

#104673TCA type slug field not generated correctly for new record with generatorOptions in columnsOverrides

Nikita Hovratov 08/20/24, 17:01 updated 11/06/26, 08:05

Description

The scenario is we have a slug field defined, but the generatorOptions are to be found in types/columnsOverrides section.
This is already handled in FormSlugAjaxController, however for NEW records, this does not work because it relies on the existence of the db row.
A fix would be to provide the record type already in the ajax request, which should be known by FormEngine at this point.

Reviews 3

History 812

  1. Stefan Bürk commented <span data-processor="relativetime" data-value="2024-09-12T20:29:35+00:00" > 09/12/24, 20:29 </span>

    Slughandling DataHandler / FormEngine has more caveats related to slug generation/sanitzation.
    Stumpeled over that (DH / functional tests) while refactoring https://review.typo3.org/c/Packages/TYPO3.CMS/+/85574
    and testing / debugging through the DataHandler->processDataMap() step to test/verify the
    change (and changes for the change).

  2. Oliver Bartsch commented <span data-processor="relativetime" data-value="2026-11-05T08:07:14+00:00" > 11/05/26, 08:07 </span>

    Hey,

    thanks. I now pushed a patch for this.

    FormSlugAjaxController::suggestAction() worked out the record type only from the database row to apply the “columnsOverrides” of the slug field. For a new record the uid is “NEW…”, so there is no row, the type cannot be determined and the proposal was generated with the base “generatorOptions”. FormEngine, however, renders the slug element with the overridden configuration, e.g. listening on different fields.

    InputSlugElement now passes the record type FormEngine already resolved (recordTypeValue) through the slug JavaScript module to the AJAX request.

    Cheers, Oli

  3. Gerrit Code Review pushed patch set 1 for main to change 97355 status Accepted Under Review <span data-processor="relativetime" data-value="2026-11-05T08:07:29+00:00" > 11/05/26, 08:07 </span>

  4. Oliver Bartsch commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-11-05T10:20:10+00:00" > 11/05/26, 10:20 </span>

    Applied in changeset commit:a9724bf5e79e2aa9ed2348c64630c2273c9d9820.

  5. Gerrit Code Review pushed patch set 1 for 14.3 to change 97370 status Resolved Under Review <span data-processor="relativetime" data-value="2026-11-05T11:02:14+00:00" > 11/05/26, 11:02 </span>

  6. Oliver Bartsch commented and changed status Under Review Resolved <span data-processor="relativetime" data-value="2026-11-06T08:05:10+00:00" > 11/06/26, 08:05 </span>

    Applied in changeset commit:84c826be8d3d174dab34092ad43c57619c9c869d.