Review main Merged

93668[BUGFIX] Fix exception for fields without label in column selector

Benni Mack CR +2 V +2 Normal +89 −4 updated 04/21/26, 15:05

Commit message

When selecting columns like t3ver_stage or l10n_diffsource in the
"Show columns" dialog of the list module, an exception occurred
because these fields lack a proper label.

There were two root causes:

In FileList::getFieldLabel(), a null value was passed to
LanguageService::translateLabel() which expects a string, causing
a TypeError. Additionally, there was no fallback to the core
locallang labels for these fields.

In ColumnSelectorController::getColumns(), empty string labels from
TCA fields (like l10n_diffsource which has type=passthrough without
a label) were not caught by the null-coalescing operator, preventing
the LLL fallback from being reached.

This patch adds the missing labels for t3ver_stage and
l10n_diffsource to locallang_core.xlf and hardens both
ColumnSelectorController and FileList to properly fall back to
LLL labels when a field has no or an empty label.

Review

  • Code review CR +2 Done
    • Annett Jähnichen +2
    • Josef Glatz +1
    • Garvin Hicking +1
  • Verified V +2 Done
    • Annett Jähnichen +2
    • Josef Glatz +1
    • Oliver Klee +1
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 4

Review log 1215

  1. Benni Mack uploaded patch set 1 04/14/26, 16:08

  2. core-ci voted on patch set 1 V +1 04/14/26, 16:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100173

  3. Benni Mack marked it ready for review 04/14/26, 21:15

  4. Benni Mack updated the commit message in patch set 2 V +1 04/14/26, 21:16

  5. core-ci voted on patch set 2 V +1 04/14/26, 21:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100204

  6. Garvin Hicking voted on patch set 2 CR +1 V +1 04/15/26, 01:08

  7. Josef Glatz commented on patch set 2 V -1 04/15/26, 03:38

    locallang_core.xlf:178

    What about using a more natural label? E.g. - Translation differences - Differences (Source vs. Translation)
  8. Josef Glatz commented on patch set 3 CR +1 V +1 04/15/26, 06:45

    Published edit on patch set 2.
  9. Garvin Hicking voted on patch set 3 CR +1 V +1 04/15/26, 06:49

  10. Josef Glatz commented on patch set 3 CR +1 V +1 04/15/26, 06:51

    locallang_core.xlf:178 Reply

    > What about using a more natural label? > > E.g. > > - Translation differences > - Differences (Source vs. Translation) Discussed with Benni in PM.
  11. core-ci voted on patch set 3 V +1 04/15/26, 06:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100228

  12. Oliver Klee voted on patch set 3 V +1 04/15/26, 07:41

  13. Annett Jähnichen voted on patch set 3 CR +2 V +2 04/15/26, 09:12

  14. Annett Jähnichen merged patch set 4 04/15/26, 09:12

  15. Ayke Halder commented on patch set 4 04/15/26, 10:12

    Post -1: I'm trying a follow-up as cleanup.

    FileList.php:1732 Unresolved

    This never works here! See code above which is already checking for `$specialLabel`: ``` $specialLabel = $lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.' . $field) ``` .