Review main Merged

88827[BUGFIX] Preserve language of translations on copy

Astrid Haubold CR +2 V +2 Normal +72 −7 updated 05/05/25, 10:17

Commit message

When copying an element with existing translations, the language of those translations  must not be changed.
In addition, when copying or moving a -1 element to default language, it must keep the value -1.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Benni Mack +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Benni Mack +1
    • core-ci +1 CI

Issues 4

Files 4

Review log 1318

  1. Astrid Haubold uploaded patch set 1 03/28/25, 15:26

  2. core-ci voted on patch set 1 V -1 03/28/25, 15:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76597

  3. Astrid Haubold uploaded patch set 2 V -1 05/02/25, 08:54

  4. core-ci voted on patch set 2 V +1 05/02/25, 08:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/78438

  5. Steffen Frese voted on patch set 2 V +1 05/02/25, 12:22

  6. Astrid Haubold uploaded patch set 3 V +1 05/03/25, 08:24

  7. core-ci voted on patch set 3 V +1 05/03/25, 08:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/78467

  8. Benni Mack commented on patch set 3 05/03/25, 16:51

    I think this might also resolve this one https://review.typo3.org/c/Packages/TYPO3.CMS/+/89068
  9. Astrid Haubold commented on patch set 3 05/03/25, 17:37

    Reply

    I'm afraid not. In 89068 the value in $value['update']['sys_language_uid'] is already wrong (0, when copying a -1 element into default language for instance at top position). So the check whether the language of the record to be copied equals that of $value['update']['sys_language_uid'] fails and the value of sys_language_uid is still wrongly updated from -1 to 0.
  10. Astrid Haubold uploaded patch set 4 V +1 05/04/25, 13:00

  11. core-ci voted on patch set 4 V +1 05/04/25, 13:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/78490

  12. Astrid Haubold commented on patch set 4 05/04/25, 13:14

    Reply

    The new patchset would resolve https://review.typo3.org/c/Packages/TYPO3.CMS/+/89068 as far as I can see. I'm not sure though if this is the right place to do it. Also -1 is only reset (to -1) when copying/moving a -1 element to language 0. This is current behavior and I think it is correct: if a -1 element is copied or moved to a non default language it should imo change language as do all other elements. But with drag & drop it is current behavior that -1 is kept if an element is moved to a non default language. If that is the intended overall behavior, -1 can be reset for all languages not only 0 in this patch.
  13. Astrid Haubold updated the commit message in patch set 5 V +1 05/04/25, 13:15

  14. core-ci voted on patch set 5 V +1 05/04/25, 13:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/78491

  15. Christian Kuhn commented on patch set 5 CR +1 V +1 05/05/25, 09:47

    Reply

    i'd say priority is to get the regression fixed. the patch misses the workspace scenarios, but we could add them later. i think we should bring this in. many thanks for looking at this, astrid!
  16. Benni Mack voted on patch set 5 CR +1 V +1 05/05/25, 09:49

  17. Christian Kuhn voted on patch set 5 CR +2 V +2 05/05/25, 09:50

  18. Christian Kuhn merged patch set 6 05/05/25, 10:17