Review main Merged

97297[TASK] Introduce a marker for the default language value

André Buchmann CR +2 V +2 Hard +492 −361 updated 11/06/26, 05:50

Commit message

A record's language field, usually "sys_language_uid", uses 0 for the
record in the default language, the original record that translations
point to. Backend logic, selectors and filters use the same value to
express "default language", and checks like "> 0" are used to detect
translations.

Add \TYPO3\CMS\Core\Schema\LanguageMarker::DEFAULT_LANGUAGE next to
the existing ALL_LANGUAGES marker and use it wherever 0 expresses a
language: comparisons, translation checks, query constraints,
fallbacks, defaults, array keys and SQL fragments in TCA.

The class description is adjusted, as the default language is the ID
of a site language and not a reserved value. The marker is not
necessarily the language returned by
SiteInterface::getDefaultLanguage(), which falls back to the first
configured language if a site does not configure language 0.

Behavior is unchanged. Other uses of 0, for example translation
parent pointers or positional array indexes, keep the literal.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Benni Mack +2
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 137

Show 117 more files

Review log 810

  1. André Buchmann uploaded patch set 1 11/02/26, 10:17

  2. core-ci voted on patch set 1 V +1 11/02/26, 10:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113078

  3. Benni Mack commented on patch set 1 11/04/26, 08:57

    EditDocumentController.php:1719

    you missed one ;)
  4. André Buchmann uploaded patch set 2 V +1 11/05/26, 13:23

  5. André Buchmann commented on patch set 2 11/05/26, 13:25

    EditDocumentController.php:1719 Reply

    Nice catch. Done
  6. core-ci voted on patch set 2 V +1 11/05/26, 13:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113410

  7. Benni Mack voted on patch set 2 CR +1 V +1 11/05/26, 15:40

  8. Simon Schaufelberger voted on patch set 2 CR +1 V +1 11/06/26, 00:59

  9. Benni Mack voted on patch set 2 CR +2 V +2 11/06/26, 05:50

  10. Benni Mack merged patch set 3 11/06/26, 05:50