Review main Merged

86773[BUGFIX] Sync language of inline children on copy

Astrid Haubold CR +2 V +2 Hard +507 −35 updated 01/10/25, 10:07

Commit message

There are three copy related DataHandler operations, each with
suble differences when elements are copied or localized to
different localizations:

* "copy" is a "free mode" copy operation
* "copyToLanguage" is a "free mode" copy operation
* "localize" is a "connected mode" copy operation

"copy" (which uses DH copyRecord()) and "copyToLanguage" (which
uses DH localize()) are quite similar, except sorting and record
prefixing details. This distinction is unfortunate and convoluted
in general, but there is also a straight issue: When using "copy"
(typically from clipboard), copied inline children do not get the
correct sys_language_uid set.

The patch adapts behavior of inline elements to that of the parent
on copy: The language field of all copied records is updated after
the actual copying has taken place. This way not only the copied
parent but also its inline relations will have the new language value
when copied to another language.

The patch implements an according loopt to DH process_cmdmap()
together with a relatively straight code refactoring and a hint
this overall scenario should be streamlined.

Review

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

Issues 4

Files 15

Review log 4257

Show 2432 earlier messages
  1. Astrid Haubold uploaded patch set 1 10/25/24, 08:03

  2. Astrid Haubold rebased onto patch set 2 10/25/24, 08:13

  3. core-ci voted on patch set 1 V -1 10/25/24, 08:14 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68587

  4. core-ci voted on patch set 2 V -1 10/25/24, 08:22 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68589

  5. Astrid Haubold uploaded patch set 3 V -1 11/01/24, 11:57

  6. core-ci voted on patch set 3 V -1 11/01/24, 12:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68959

  7. Astrid Haubold uploaded patch set 4 V -1 12/12/24, 11:55

  8. core-ci voted on patch set 4 V +1 12/12/24, 12:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71027

  9. Benni Mack commented on patch set 4 12/12/24, 16:49

    Great work so far!

    DataHandler.php:3493

    do we also need to adapt the l10n_parent field?
  10. Astrid Haubold commented on patch set 4 12/13/24, 10:43

    DataHandler.php:3493 Reply

    I don't think so: imo a connection to the original language version is not expected when copy command is used rather than localize or copyToLanguage. This is also current behaviour for the parent record. The aim of this fix is to make child records behave in the same way as the parent already does.
  11. Benni Mack commented on patch set 4 12/13/24, 14:42

    DataHandler.php:3493 Reply

    Done
  12. Astrid Haubold uploaded patch set 5 V +1 12/16/24, 15:15

  13. core-ci voted on patch set 5 V +1 12/16/24, 15:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71201

  14. Eric Harrer voted on patch set 5 CR +1 V +1 12/20/24, 12:21

  15. André Buchmann commented on patch set 5 CR -1 V +1 12/20/24, 12:34

    [BUGFIX] Sync language of inline elements after copy
    not only the
  16. Jo Hasenau voted on patch set 5 CR +1 V +1 12/20/24, 12:35

  17. Astrid Haubold uploaded patch set 6 CR +1 V +1 12/20/24, 13:14

  18. core-ci voted on patch set 6 V +1 12/20/24, 13:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71508

  19. André Buchmann voted on patch set 6 CR +1 V +1 12/20/24, 13:58

  20. André Buchmann commented on patch set 6 12/20/24, 13:58

    Reply

    Done

    Reply

    Done
  21. Eric Harrer voted on patch set 6 CR +1 V +1 12/22/24, 19:27

  22. Benni Mack voted on patch set 6 CR +1 01/08/25, 11:27

  23. Christian Kuhn commented on patch set 6 CR -1 01/08/25, 11:34

    working on in.
  24. Christian Kuhn uploaded patch set 7 CR +1 V +1 01/09/25, 11:43

  25. Christian Kuhn voted on patch set 7 CR -1 01/09/25, 11:43

  26. core-ci voted on patch set 7 V +1 01/09/25, 11:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72134

  27. Christian Kuhn commented on patch set 7 01/09/25, 13:43

    copyParentContentToDiffLanguageWAllChildren.csv:19

    this shows that inline children now receive the same sys_language_uid when a parent element is copied to a different language using 'copy' DH command which 'copyToLanguage' already did: this .csv and copyParentContentToLanguageWAllChildren.csv are now nearly identical except the [Translate to ...] prefixes.
  28. Christian Kuhn uploaded patch set 8 CR -1 V +1 01/09/25, 15:39

  29. Christian Kuhn voted on patch set 8 CR -1 01/09/25, 15:40

  30. core-ci voted on patch set 8 V +1 01/09/25, 15:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72149

  31. Christian Kuhn uploaded patch set 9 CR -1 V +1 01/09/25, 16:14

  32. Christian Kuhn voted on patch set 9 CR -1 01/09/25, 16:14

  1. core-ci voted on patch set 9 V +1 01/09/25, 16:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72152

  2. Christian Kuhn commented on patch set 9 01/09/25, 16:22

    copyParentContentToDiffLanguageWAllChildren.csv:26

    having this {""sys_language_uid"":""""} for l18n_diffsource is fishy, isn't it?
  3. Christian Kuhn commented on patch set 9 01/09/25, 16:24

    copyParentContentToDiffLanguageWAllChildren.csv:26 Reply

    i'll add an @todo to the .csv.
  4. Christian Kuhn uploaded patch set 10 CR -1 V +1 01/09/25, 16:27

  5. Christian Kuhn voted on patch set 10 CR -1 01/09/25, 16:27

  6. core-ci voted on patch set 10 V +1 01/09/25, 16:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72153

  7. Christian Kuhn uploaded patch set 11 CR -1 V +1 01/09/25, 16:48

  8. Christian Kuhn voted on patch set 11 CR -1 01/09/25, 16:48

  9. core-ci voted on patch set 11 V +1 01/09/25, 16:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72154

  10. Christian Kuhn uploaded patch set 12 CR -1 V +1 01/09/25, 16:55

  11. Christian Kuhn updated the commit message in patch set 13 01/09/25, 16:57

  12. core-ci voted on patch set 12 V +1 01/09/25, 17:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72155

  13. core-ci voted on patch set 13 V +1 01/09/25, 17:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72156

  14. Christian Kuhn updated the commit message in patch set 14 V +1 01/09/25, 17:16

  15. Christian Kuhn commented on patch set 14 01/09/25, 17:16

    Reply

    Done
  16. Christian Kuhn uploaded patch set 15 01/09/25, 17:17

  17. core-ci voted on patch set 14 V +1 01/09/25, 17:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72157

  18. core-ci voted on patch set 15 V +1 01/09/25, 17:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72158

  19. Christian Kuhn voted on patch set 15 CR +1 V +1 01/09/25, 17:27

  20. Benni Mack voted on patch set 15 CR +1 01/10/25, 08:30

  21. André Buchmann commented on patch set 15 CR +1 V +1 01/10/25, 09:44

    Thank you Lolli for improving the patch. Tested it successfully
  22. Astrid Haubold commented on patch set 15 01/10/25, 09:53

    I think as author I'm not supposed to vote, but had a look at the changes: great as far as I can see. Thank you @lolli@schwarzbu.ch for all your work and useful feedback!
  23. Benni Mack voted on patch set 15 CR +2 V +2 01/10/25, 09:55

  24. Benni Mack commented on patch set 15 01/10/25, 10:07

    Thank you, Astrid + Lolli!
  25. Benni Mack merged patch set 16 01/10/25, 10:07