Issue Bug Closed

#106334Translations of copied elements end up in default language

Astrid Haubold 03/07/25, 14:21 updated 12/02/25, 14:22

Description

When a content element with translations is copied within default language, the translations are wrongly copied into default language too instead of their respective languages.

Steps to reproduce:
  • make sure allowLanguageSynchronization is not explicitly set to true in TCA for any inline field of tt_content
  • create a new page and translate it
  • add a simple text element and translate that too
  • copy the default language element and paste into default language

Expected behaviour:
translations of the copied element should be copied and should keep their respective language

Actual behaviour:
translations of the copied element are copied, but loose their language and all end up in default language

Reviews 2

Files 1

History 713

  1. Chris Müller changed subject Tranlsations of copied elements end up in default language Translations of copied elements end up in default language <span data-processor="relativetime" data-value="2025-03-07T18:33:15+00:00" > 03/07/25, 18:33 </span>

  2. Astrid Haubold commented <span data-processor="relativetime" data-value="2025-03-28T16:11:23+00:00" > 03/28/25, 16:11 </span>

    I started a patch with just a test to show the wrong behaviour.
    Lines 3358 to 3370 in the DataHandler (introduced with patch for #89787) are causing the problem: here sys_language_uid is set to the target language for all copied elements that are connected with the main element. Unfortunately this includes existing translations so that their language is (wrongly) changed too.
    I am not sure what would be the best approach to an actual solution.

  3. Soren Malling commented <span data-processor="relativetime" data-value="2025-05-02T09:21:56+00:00" > 05/02/25, 09:21 </span>

    This is also relevant for 12.4 – can this be backported?

  4. Astrid Haubold commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-05-05T10:20:07+00:00" > 05/05/25, 10:20 </span>

    Applied in changeset commit:140669d94e5dbdb2bef61195e8c0c880f1a42215.