Issue Bug Under Review

#111645l10n_source of translated inline children still points to the original after copying the parent record

Alexander Schnitzler 11/27/26, 18:07 updated 11/27/26, 19:08

Description

When a single record with inline (IRRE) children is copied together with its translations, the copied translated children keep l10n_source pointing to the original default language child, while l18n_parent is remapped to the copy.

Copying a whole page remaps l10n_source correctly (DataHandler::copyPages(), see #97469), and so does copyL10nOverlayRecords() for the copied record itself. The translated inline children are copied through the inline field of the translated parent (copyRecord_processRelation() -> copyRecord_raw()). On that path l18n_parent is remapped as a select relation in remapListedDBRecords(), but l10n_source is a passthrough field and is never remapped. The same copy therefore remaps l10n_source on one path and leaves it on the other.

Steps to reproduce

Fixture extension test_irre_foreignfield (tt_content.tx_testirreforeignfield_hotels, child table tx_testirreforeignfield_hotel):

  1. Translate the page into language 1.
  2. Localize a tt_content record with inline hotels into language 1. The hotels are localized along with it.
  3. Copy the tt_content record to another page ($cmd['tt_content'][<uid>]['copy'] = <pid>).
  4. Inspect tx_testirreforeignfield_hotel.

Expected

The copied translated hotels have l10n_source = copy of their original l10n_source, like l18n_parent.

Actual

The copied translated hotels have l18n_parent = copied default hotel, but l10n_source = original default hotel on the source page.

Impact

  • The translation lookup (LocalizationRepository::getRecordTranslation(), on 13.4 BackendUtility::getRecordLocalization()) matches by l10n_source first, so the translations of the copied children are not found. Localizing the copied children again, by an editor or by an extension such as an automatic translation, creates a second translation in the same language.
  • The record list of the localization wizard excludes records by l10n_source as well.

Affects 13.4, 14.3 and main.

Reviews 1

History 01

  1. Gerrit Code Review pushed patch set 2 for main to change 98113 status New Under Review 11/27/26, 19:08