Review main Merged

62192[BUGFIX] Prevent localizing already translated inline children again

Andreas Wolf CR +2 V +2 Normal +135 −4 updated 10/25/26, 19:23

Commit message

When inline or file children are synchronized into translations, the
children of the language parent are read from the database. A child
that has just been localized still points to the default language
parent until DataHandler remaps it to its translated parent at the end
of the process. Reading the children of the language parent in the
meantime returns this translated child as well, and it gets localized
once more, with its l10n_parent pointing to the translation of
another language.

This happens when several translations are synchronized within one
DataHandler run, for example when saving the default language record
or copying a page together with its translations, and when records
are localized into different languages in concurrent requests.

Children translated into a language other than the one of their
parent record are now skipped. Concurrent localizations into the
same language are not prevented by this change.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Wouter Wolters +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oliver Klee +1
    • Wouter Wolters +1
    • core-ci +1 CI

Issues 3

Files 7

Review log 5280

Show 3455 earlier messages
  1. Andreas Wolf uploaded patch set 1 11/05/19, 07:32

  2. TYPO3com voted on patch set 1 V -1 11/05/19, 07:43 Completed build in 10m 40s on Tue, 5 Nov, 07:43 AM Test Summary: 1682 of 48407 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37998

  3. Andreas Wolf uploaded patch set 2 12/13/19, 15:50

  4. TYPO3com voted on patch set 2 V -1 12/13/19, 15:58 Completed build in 08m 00s on Fri, 13 Dec, 03:58 PM Test Summary: 3 of 69167 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39401

  5. Oliver Hader wrote 01/09/20, 10:29

    Topic set to DataHandler/l10n
  6. Benni Mack rebased onto patch set 3 01/27/20, 10:44

  7. TYPO3com voted on patch set 3 V -1 01/27/20, 10:55 Completed build in 11m 05s on Mon, 27 Jan, 10:55 AM Test Summary: 1 of 71053 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40258

  8. TYPO3com commented on patch set 3 05/13/20, 14:59 Completed build in 15m 38s on Wed, 13 May, 02:59 PM Test Summary: 2 of 74195 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3366

  9. Christian Eßl updated the commit message in patch set 4 05/13/20, 15:13

  10. TYPO3com voted on patch set 4 V -1 05/13/20, 15:24 Completed build in 11m 29s on Wed, 13 May, 03:24 PM Test Summary: 1 of 74195 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3370

  11. Christian Eßl commented on patch set 4 05/13/20, 16:17

    Weird, the functional test appears to work locally, but bamboo shows different results for the test...
  12. Benni Mack updated the commit message in patch set 5 05/25/20, 18:51

  13. Joerg Kummer commented on patch set 5 10/18/20, 21:07

    Verified for 10.4
  14. TYPO3com voted on patch set 5 V -1 10/19/20, 18:53 Completed build in 16m 04s on Mon, 19 Oct, 06:53 PM Test Summary: 3 of 74327 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6665

  15. Benni Mack rebased onto patch set 6 11/04/21, 12:09

  16. core-ci voted on patch set 6 V -1 11/04/21, 12:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18876

  17. Benni Mack commented on patch set 7 11/12/21, 11:10

    Published edit on patch set 6.
  18. core-ci voted on patch set 7 V -1 11/12/21, 11:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19204

  19. Benni Mack updated the commit message in patch set 8 11/18/21, 10:47

  20. core-ci voted on patch set 8 V -1 11/18/21, 12:37 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19472

  21. Benni Mack wrote 11/29/21, 10:18

    Change destination moved from master to main
  22. Benni Mack updated the commit message in patch set 9 11/29/21, 14:07

  23. core-ci voted on patch set 9 V -1 11/29/21, 18:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20100

  24. Christian Eßl wrote 04/02/23, 08:52

    Removed reviewer Christian Eßl.
  25. Benni Mack uploaded patch set 10 V -1 04/03/23, 08:44

  26. core-ci voted on patch set 10 V -1 04/03/23, 09:02 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40006

  27. Benni Mack updated the commit message in patch set 11 V -1 05/03/23, 09:42

  28. Oliver Hader rebased onto patch set 12 07/05/23, 11:39

  29. core-ci voted on patch set 12 V -1 07/05/23, 11:57 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43496

  30. Benni Mack uploaded patch set 13 V -1 07/05/23, 12:48

  31. core-ci voted on patch set 13 V -1 07/05/23, 13:03 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43511

  32. Oliver Hader commented on patch set 13 07/05/23, 13:13

    * tests should be in `DataHandling/FAL` * tests should add table `pages`, especially the `l10n_state` field
  33. Benni Mack updated the commit message in patch set 14 V -1 10/18/24, 14:08

  34. Sybille Peters uploaded patch set 15 12/16/24, 17:50

  35. Sybille Peters uploaded patch set 16 12/16/24, 17:56

  36. Sybille Peters uploaded patch set 17 12/16/24, 17:58

  37. Sybille Peters voted on patch set 17 V +1 12/16/24, 18:00

  38. core-ci voted on patch set 15 V -1 12/16/24, 18:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71217

  39. core-ci voted on patch set 16 V -1 12/16/24, 18:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71218

  40. core-ci voted on patch set 17 V -1 12/16/24, 18:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71219

  41. Sybille Peters uploaded patch set 18 V +1 12/16/24, 18:31

  42. Sybille Peters uploaded patch set 19 12/16/24, 18:32

  43. core-ci voted on patch set 18 V -1 12/16/24, 18:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71220

  44. core-ci voted on patch set 19 V -1 12/16/24, 18:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71221

  45. Sybille Peters commented on patch set 19 CR -1 V -1 12/19/24, 20:09

    DataMapProcessor.php:710

    $configuration is set to $GLOBALS['TCA'][$item->getTableName()]['columns'][$fieldName]; above so this should rather be $GLOBALS['TCA'][$item->getTableName()]['ctrl']['languageField']

    DataMapProcessor.php:719

    When debugging this $fromRecord did not contain the $itemTableLanguageField (usually 'sys_language_uid'). I think the code probably changed between v13 and v14 so this will no longer work.
  46. Sybille Peters uploaded patch set 20 CR -1 V -1 12/19/24, 20:20

  47. core-ci voted on patch set 20 V -1 12/19/24, 20:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71472

  48. Sybille Peters uploaded patch set 21 V -1 12/19/24, 20:43

  49. Sybille Peters commented on patch set 21 12/19/24, 20:46

    It seems to fix the bug now (reproducible test case in issue). There are still some tests failing.

    DataMapProcessor.php:710 Reply

    Done

    DataMapProcessor.php:719 Reply

    Done
  50. core-ci voted on patch set 21 V -1 12/19/24, 21:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71476

  51. Sybille Peters uploaded patch set 22 V -1 12/19/24, 21:21

  52. core-ci voted on patch set 22 V +1 12/19/24, 21:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71477

  53. Sybille Peters commented on patch set 22 V -1 12/19/24, 21:29

    nonononono
  54. Sybille Peters commented on patch set 22 12/20/24, 07:47

    The current version of the patch seems to fix or at least improve the problem that file references are duplicated and in v14 the translation wizard hangs (because of exception) and does not translate but the result does not look 100% fine: In the translated result we see 2 files (because the ref in the orig language still has sys_language_uid = -1). Please look into related issues and what is root cause of problem.

    DataMapProcessor.php:708

    Problem seems to already occur earlier in the record of the original language (before translation): After changing the language back to 0, the content element has language 0 and the sys_file_reference has language -1. This occurs even without allowLanguageSynchronization, see also issue #103970. I think this should be resolved first (and maybe this fix is not necessary). I added a comment in the issue: https://forge.typo3.org/issues/88980#note-28
  55. Sybille Peters commented on patch set 22 12/28/24, 09:45

    I have created an alternative solution for underlying issue which fixes this issue and several others: https://review.typo3.org/c/Packages/TYPO3.CMS/+/87595 It still needs tests and possibly an upgrade wizard.
  1. Sybille Peters rebased onto patch set 23 V +1 03/28/25, 16:45

  2. core-ci voted on patch set 23 V +1 03/28/25, 16:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76607

  3. Benni Mack updated the commit message in patch set 24 V +1 04/22/26, 06:30

  4. core-ci voted on patch set 24 V -1 04/22/26, 06:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100710

  5. Sybille Peters wrote 04/23/26, 14:09

    Removed reviewer Sybille Peters.
  6. Benni Mack rebased onto patch set 25 V -1 10/13/26, 10:54

  7. core-ci voted on patch set 25 V -1 10/13/26, 11:02 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111000

  8. Benni Mack commented on patch set 26 V -1 10/13/26, 12:31

    Published edit on patch set 25.
  9. core-ci voted on patch set 26 V +1 10/13/26, 12:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111005

  10. Benni Mack uploaded patch set 27 V +1 10/13/26, 14:24

  11. Benni Mack commented on patch set 27 10/13/26, 14:26

    Reply

    I narrowed down what the current patch does and what not, also with a new issue.

    Reply

    Hi Sybille. I think both approaches fixes a different part, and your alternative the actual issue #88980, so we should continue to work on both.

    DataMapProcessor.php:708 Reply

    see comment above.
  12. core-ci voted on patch set 27 V +1 10/13/26, 14:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111012

  13. Simon Schaufelberger voted on patch set 27 CR +1 V +1 10/13/26, 16:58

  14. Benni Mack wrote 10/15/26, 22:33

    Topic DataHandler/l10n removed
  15. Benni Mack wrote 10/15/26, 22:33

    Topic set to DataHandler
  16. Benni Mack uploaded patch set 28 CR +1 V +1 10/25/26, 11:52

  17. Benni Mack rebased onto patch set 29 10/25/26, 11:55

  18. core-ci voted on patch set 28 V +1 10/25/26, 12:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112485

  19. core-ci voted on patch set 29 V +1 10/25/26, 12:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112486

  20. Benni Mack voted on patch set 29 CR +1 V +1 10/25/26, 12:58

  21. Oliver Klee voted on patch set 29 V +1 10/25/26, 13:07

  22. Wouter Wolters voted on patch set 29 CR +1 V +1 10/25/26, 13:41

  23. Benni Mack voted on patch set 29 CR +2 10/25/26, 19:23

  24. Benni Mack voted on patch set 29 V +2 10/25/26, 19:23

  25. Benni Mack merged patch set 30 10/25/26, 19:23