Review 13.4 Merged

94915[BUGFIX] Find translations with empty l10n_source

Stefan Bürk CR +2 V +2 Normal +69 −4 updated 08/01/26, 18:44

Commit message

BackendUtility::getRecordLocalization() matches existing
translations by the translationSource field (l10n_source) whenever
the table defines one, and falls back to the transOrigPointerField
(l10n_parent) only for tables without a translation source field.

A translation carrying a correct l10n_parent but an empty
l10n_source is therefore not found, although it is a valid
translation. Such records are created by TYPO3 itself: a
DataHandler datamap creating a translation by only setting the
language field and the transOrigPointerField does not populate
l10n_source, which is the usual way extensions, importers and
migrations create translations.

DataHandler::localize() uses this lookup to detect already
existing localizations. As the existing translation is invisible,
the guard does not trigger and a second translation of the same
record in the same language is created.

The lookup keeps preferring l10n_source, but additionally matches
records whose l10n_source is empty by their transOrigPointerField,
so no valid translation is lost.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Benni Mack +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 45

  1. Stefan Bürk uploaded patch set 1 07/23/26, 23:40

  2. core-ci voted on patch set 1 V +1 07/23/26, 23:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105271

  3. Benni Mack voted on patch set 1 CR +1 V +1 08/01/26, 15:08

  4. Stefan Bürk voted on patch set 1 CR +2 V +2 08/01/26, 18:44

  5. Stefan Bürk merged patch set 2 08/01/26, 18:44