Issue Bug Under Review Quiet

#111069Copies of monoglot inline children mixed up with several translations

Alexander Schnitzler 10/14/26, 17:49 updated 10/14/26, 19:20

Description

A translatable parent record has an inline relation (foreign_field) to a child table without language configuration (“monoglot” children, origUid set). With l10n_mode = exclude (or allowLanguageSynchronization) on the inline field, DataMapProcessor gives every translation of the parent its own copy of each child.

With two or more translations the copies are assigned to the wrong translation. With one translation everything works.

Reproduction

Same TCA as in #<ticket>. Hotel 1 [en] with offers 1 and 2, translations hotel 2 [de] and hotel 3 [fr], which own no offers yet. Save the default hotel:</ticket>

$dataHandler->start(['tx_testirreforeignfield_hotel' => [1 => ['offers' => '1,2']]], []);
$dataHandler->process_datamap();

Expected

German hotel 2 and French hotel 3 each own a copy of both offers.

Actual

The copies created for German are re-attached to the French hotel, the German hotel owns no offers. Adding a child to the default record when both translations already own their copies deletes the German copies instead.

Cause

DataMapProcessor::fetchDependentIdMap() maps copies of a non-translatable table by their origin only, without filtering by language or parent record:

if (!$isTranslatable) {
    $ancestorId = (int)$dependentElement[$fieldNames['origin']];
}
...
$dependentIdMap[$ancestorId] = $dependentId;

Every translation’s copy of a child has the same origin, so the last one wins and synchronizing one translation picks up the copy of another one.

Reviews 2

History 13