Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.

Review main Ready for review Quiet Breaking

96525[!!!][TASK] Unify record title resolution

Oli Bartsch CR 0 V 0 Nightmare +1303 −1551 updated 11/01/26, 22:24

Commit message

FormEngine and BackendUtility::getRecordTitle() resolved record
titles independently and formatted field values differently. The
same record could therefore show different titles, e.g. in the
editing form and in the list module.

The internal RecordTitleResolver now resolves the title in both
places, based on "label_userFunc", "label", "label_alt" and
"label_alt_force", including the record type specific
configuration. It works on a record object with unprocessed
values. The schema is determined by the table of the record. A
custom schema can be given, which allows FormEngine to resolve
titles of records of the site configuration.

As a consequence, the user function configured with
"label_userFunc" now receives the unprocessed record in FormEngine
as well. "formattedLabel_userFunc" still receives the record of
FormEngine as before. The protected methods of the TcaRecordTitle data
provider are removed.

BackendUtility::getProcessedValue() now evaluates the "labelField"
option of country fields and resolves select relations without MM
table also for records that are not yet persisted. Relation fields
without related records no longer produce "N/A" as record title,
which allows the fallback to "label_alt".

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 6
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/25/96525/6 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/25/96525/6 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote
    • core-ci +1 CI

Issues 2

Files 14

Review log 1117

  1. Oli Bartsch uploaded patch set 1 10/08/26, 09:44

  2. core-ci voted on patch set 1 V +1 10/08/26, 09:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110475

  3. Mathias Brodala commented on patch set 1 10/08/26, 10:03

    Breaking-110953-RecordTitleResolutionInFormEngine.rst:111

    Or like this: $type = $parameters['row']['type'][0] ?? $parameters['row']['type'] ?? ''; Personally I'd always prefer an explicit "Typo3Version" check however to have a marker for dropping legacy code. Not sure if PHPStan/Rector would catch the fallback variants.
  4. Oli Bartsch uploaded patch set 2 V +1 10/08/26, 11:46

  5. Oli Bartsch commented on patch set 1 10/08/26, 11:48

    Breaking-110953-RecordTitleResolutionInFormEngine.rst:111 Reply

    Thanks. The [0] ??... ?? chain doesn't work for string values: 'uri'[0] is 'u', not null, so ?? never falls back. A version check alone isn't enough either, because on v14 label_userFunc already receives the raw row outside FormEngine, e.g. in the list module. I've changed the example to keep the is_array() check and put it behind a Typo3Version check, which gives the marker for dropping the legacy code. Hope that's fine for you.
  6. core-ci voted on patch set 2 V +1 10/08/26, 11:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110485

  7. Mathias Brodala commented on patch set 2 10/08/26, 12:44

    Breaking-110953-RecordTitleResolutionInFormEngine.rst:111 Reply

    Thanks for the heads up with the PHP string character lookup. 👍
  8. Oli Bartsch rebased onto patch set 3 V +1 10/19/26, 09:29

  9. core-ci voted on patch set 3 V +1 10/19/26, 09:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111611

  10. Oli Bartsch uploaded patch set 4 V +1 10/24/26, 20:43

  11. core-ci voted on patch set 4 V +1 10/24/26, 20:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112441

  12. Simon Schaufelberger voted on patch set 4 CR +1 V +1 10/25/26, 09:25

  13. Oliver Klee voted on patch set 4 V +1 10/25/26, 13:08

  14. Oli Bartsch uploaded patch set 5 CR +1 V +1 11/01/26, 15:39

  15. core-ci voted on patch set 5 V +1 11/01/26, 15:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113023

  16. Oli Bartsch uploaded patch set 6 V +1 11/01/26, 22:14

  17. core-ci voted on patch set 6 V +1 11/01/26, 22:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113048