#111645l10n_source of translated inline children still points to the original after copying the parent record
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):
- Translate the page into language 1.
- Localize a
tt_contentrecord with inline hotels into language 1. The hotels are localized along with it. - Copy the
tt_contentrecord to another page ($cmd['tt_content'][<uid>]['copy'] = <pid>). - 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.4BackendUtility::getRecordLocalization()) matches byl10n_sourcefirst, 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_sourceas well.
Affects 13.4, 14.3 and main.
Reviews 1
History 01
-
Gerrit Code Review pushed patch set 2 for main to change 98113 status
NewUnder Review 11/27/26, 19:08