Review main Merged

92456[BUGFIX] Limit language selector to existing page translations

Benni Mack CR +2 V +2 Normal +180 −21 updated 03/13/26, 12:28

Commit message

The TCA type="language" field now only shows languages for which
a page translation exists, plus the default language. Previously,
all site languages were shown regardless of whether page translations
existed.

This caused records to become inaccessible when editors selected a
language without a corresponding page translation, as the record
would no longer appear in the page nor list module.

For pages table: Only the current language is shown, as the
language cannot be changed via FormEngine after creation - but the
language toggle should not be shown anyways.

This change only affects type=language fields that are also
the value of "sys_language_uid" = reflecting the system language.

Review

  • Code review CR +2 Done
    • Benjamin Kott +2
    • Anja Leichsenring +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Benjamin Kott +2
    • Anja Leichsenring +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 2027

Show 12 earlier messages
  1. Benni Mack uploaded patch set 1 01/22/26, 09:54

  2. core-ci voted on patch set 1 V -1 01/22/26, 10:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94026

  1. Benni Mack uploaded patch set 2 V -1 01/23/26, 20:36

  2. Benni Mack marked it ready for review 01/23/26, 20:43

  3. core-ci voted on patch set 2 V +1 01/23/26, 20:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94209

  4. Oli Bartsch commented on patch set 2 V -1 01/23/26, 22:03

    Patch works but I fear we can not globally restrict this tca type. It is not bound to the "languageField" of a table but can be used freely for everything. From the docs: > This field type displays all languages available in the current site context. Outside of the site context it displays all languages available in the installation. and > This TCA type automatically displays all available languages for the current context (the corresponding site configuration) and also automatically adds the special -1 language (meaning all languages) for all record types, except pages. This would be a breaking change.
  5. Benni Mack commented on patch set 2 01/24/26, 08:41

    Reply

    AFAIK it's a bug, my editors switch the language of a tt_content record to e.g. "macedonian" (where there is no page translation on the current page) and the record is completely gone from the user interface.
  6. Oli Bartsch commented on patch set 2 01/24/26, 09:25

    Reply

    Sure, it's a bug in this scenario, but we can not limit the tca type generally. We should add this fix by first checking if the field is used as the languageField of the table.
  7. Benni Mack uploaded patch set 3 V +1 02/12/26, 09:57

  8. core-ci voted on patch set 3 V +1 02/12/26, 10:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95699

  9. Benni Mack commented on patch set 3 02/12/26, 16:43

    Reply

    done
  10. Anja Leichsenring commented on patch set 3 02/12/26, 19:47

    now the commit message needs to mention the limitation to the languageField of a table. I leave that to you, Benni.
  11. Anja Leichsenring voted on patch set 3 V +1 02/12/26, 19:48

  12. Benni Mack rebased onto patch set 4 V +1 02/24/26, 09:27

  13. Benni Mack updated the commit message in patch set 5 02/24/26, 09:28

  14. core-ci voted on patch set 4 V -1 02/24/26, 10:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96689

  15. core-ci voted on patch set 5 V -1 02/24/26, 10:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96690

  16. Benjamin Kott uploaded patch set 6 V -1 03/11/26, 10:44

    remove null site filter from condition
  17. core-ci voted on patch set 6 V -1 03/11/26, 10:55 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97747

  18. Benjamin Kott uploaded patch set 7 V -1 03/11/26, 12:51

  19. core-ci voted on patch set 7 V +1 03/11/26, 13:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97760

  20. Anja Leichsenring voted on patch set 7 CR +1 V +1 03/11/26, 19:40

  21. Benjamin Kott voted on patch set 7 CR +1 V +1 03/12/26, 08:33

  22. Stefan Bürk voted on patch set 7 CR +1 03/12/26, 12:44

  23. Stefan Bürk voted on patch set 7 V +1 03/12/26, 12:52

  24. Benjamin Kott voted on patch set 7 CR +2 V +2 03/13/26, 12:28

  25. Benjamin Kott merged patch set 8 03/13/26, 12:28