Review main Ready for review

66905[BUGFIX] Do not show already translated CE in Translation Wizard

Markus Gerdes CR +1 V +1 Normal +71 −46 updated 11/18/26, 20:14

Commit message

Having an inconsistent CE with l18n_parent set to an uid,
but l10n_source = 0, the Translation Wizard shows
the already translated CE as a possible selection.
This inconsistency happens if editors set the l18n_parent manually.

This is a valid behaviour, if the translation
source in something other than the default
language. For the default language the l18n_parent
field can be used as a fallback as it would be
the same value anyway.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 19
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/05/66905/19 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/05/66905/19 && git cherry-pick FETCH_HEAD

Review

  • Code review CR +1 Needs a vote
    • Alexander Stehlik +1
    • Markus Gerdes +1
    • Peter Kraume +1
    • Simon Schaufelberger +1
  • Verified V +1 Needs a vote
    • Alexander Stehlik +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 4562

Show 2737 earlier messages
  1. Markus Gerdes uploaded patch set 1 11/26/20, 08:32

  2. TYPO3com voted on patch set 1 V +1 11/26/20, 08:46 Completed build in 13m 43s on Thu, 26 Nov, 08:46 AM Test Summary: 32394 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7586

  3. Simon Gilli updated the commit message in patch set 2 12/07/20, 08:40

  4. TYPO3com voted on patch set 2 V +1 12/07/20, 08:51 Completed build in 10m 36s on Mon, 7 Dec, 08:51 AM Test Summary: 32413 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7888

  5. Simon Gilli commented on patch set 2 12/07/20, 08:52

    LocalizationRepository.php:207

    The core normally avoids Yoda notation.
  6. Benni Mack uploaded patch set 3 11/03/21, 17:07

  7. Benni Mack commented on patch set 3 11/03/21, 17:07

    LocalizationRepository.php:207 Reply

    Done
  8. core-ci voted on patch set 3 V +1 11/03/21, 17:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18802

  9. Simon Gilli voted on patch set 3 V +1 CR +1 11/12/21, 11:27

  10. Nikita Hovratov commented on patch set 3 V -1 11/12/21, 16:09

    Can someone help me to verify this? In my tests it does not help at all. Ok, now l10n_source = 0 is added to $originalUids and further down uid = 0 is excluded from the query. But there can't be uids with uid = 0, so how can this fix anything?
  11. Nikita Hovratov uploaded patch set 4 11/12/21, 16:21

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

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

  14. core-ci voted on patch set 5 V -1 11/18/21, 12:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19473

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

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

  17. core-ci voted on patch set 6 V -1 11/29/21, 18:41 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20102

  18. Nikita Hovratov uploaded patch set 7 06/25/22, 21:36

  19. core-ci voted on patch set 7 V +1 06/25/22, 21:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28418

  20. Nikita Hovratov uploaded patch set 8 06/25/22, 22:02

  21. core-ci voted on patch set 8 V +1 06/25/22, 22:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28420

  22. Markus Gerdes commented on patch set 8 CR +1 06/27/22, 07:13

    Thanks for cleaning up
  23. Markus Klein commented on patch set 8 07/05/22, 09:02

    DefaultPagesAndContent.csv:6

    this is not necessarily broken. If an editor/admin set the parent manually, the source field does not receive a value.
  24. Nikita Hovratov commented on patch set 8 07/05/22, 09:17

    DefaultPagesAndContent.csv:6 Reply

    The source field should always be set, except it's in default language or an element created in free-mode. Having a l18n_parent but no l10n_source is broken by definition. See the issue comment from lolli for this: "l18n_parent = id AND l10n_source = 0 -> shouldn't happen / db inconsistency."
  25. Markus Klein commented on patch set 8 07/05/22, 09:33

    DefaultPagesAndContent.csv:6 Reply

    the point is "shouldn't" it will happen for sure, because there is no way for a BE user to set this field. for instance when wiring free mode CEs back to connected mode or similar. So I'm strongly against declaring this "invalid" or "broken" if this is the official way to do things.
  26. Nikita Hovratov commented on patch set 8 07/05/22, 09:53

    DefaultPagesAndContent.csv:6 Reply

    labelling it "inconsistent" instead will suffice?
  27. Markus Klein commented on patch set 8 07/05/22, 11:45

    DefaultPagesAndContent.csv:6 Reply

    I would indeed prefer that, if you don't mind. I'll happily adjust that myself of course
  28. Markus Klein commented on patch set 9 07/05/22, 11:46

    Published edit on patch set 8.
  29. Nikita Hovratov commented on patch set 8 07/05/22, 11:46

    DefaultPagesAndContent.csv:6 Reply

    go ahead
  30. Markus Klein updated the commit message in patch set 10 07/05/22, 11:47

  31. core-ci voted on patch set 10 V +1 07/05/22, 11:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28668

  32. core-ci voted on patch set 9 V +1 07/05/22, 12:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28667

  33. Markus Klein voted on patch set 10 CR +1 07/05/22, 12:05

  34. Markus Gerdes voted on patch set 10 CR +1 07/05/22, 12:13

  35. Andreas Kießling commented on patch set 10 10/12/22, 15:35

    LocalizationRepository.php:212

    Shouldn't we always use l18n_parent when $languageId (source) is 0? I have mismatching l10n_source and l18n_parent entries in the tt_content in connected mode, no idea how that happened. Removing the $l10n_source constraint seems to work in that case
  36. Benni Mack commented on patch set 10 03/23/23, 10:23

    Can you rebase this patch?
  37. Markus Klein uploaded patch set 11 CR +1 V +1 03/23/23, 11:05

  1. Markus Klein uploaded patch set 12 03/23/23, 11:07

  2. Markus Klein commented on patch set 12 03/23/23, 11:11

    LocalizationRepository.php:212 Reply

    Generally that's expected: You can translate from the language 3 record (source) into language 1 and the parent is still pointing to the language 0 record. I still have to think about the condition here
  3. core-ci voted on patch set 12 V +1 03/23/23, 11:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39462

  4. core-ci voted on patch set 11 V +1 03/23/23, 11:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39461

  5. Markus Klein uploaded patch set 13 V +1 04/05/23, 07:09

  6. core-ci voted on patch set 13 V +1 04/05/23, 07:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40151

  7. Benni Mack updated the commit message in patch set 14 V +1 05/03/23, 09:42

  8. Benni Mack rebased onto patch set 15 07/04/23, 20:09

  9. core-ci voted on patch set 15 V +1 07/04/23, 20:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43434

  10. Markus Gerdes commented on patch set 15 11/23/23, 15:58

    LocalizationRepository.php:212 Reply

    As Christian Kuhn wrote in the Bug report: l18n_parent = id AND l10n_source = 0 -> shouldn't happen / db inconsistency.
  11. Markus Klein commented on patch set 15 11/24/23, 08:02

    LocalizationRepository.php:212 Reply

    I actually disagree on Christians saying. I commented in the ticket.
  12. Oliver Hader updated the commit message in patch set 16 V +1 10/18/24, 14:08

  13. Benni Mack uploaded patch set 17 04/12/25, 12:25

  14. core-ci voted on patch set 17 V +1 04/12/25, 12:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/77617

  15. Benni Mack wrote 04/21/26, 14:58

    Removed cc Benni Mack.
  16. Benni Mack updated the commit message in patch set 18 V +1 04/22/26, 06:50

  17. core-ci voted on patch set 18 V -1 04/22/26, 11:30 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100812

  18. Alexander Stehlik voted on patch set 18 CR +1 V +1 06/18/26, 23:10

  19. Alexander Stehlik uploaded patch set 19 CR +1 V +1 06/18/26, 23:20

  20. Alexander Stehlik commented on patch set 19 CR +1 V +1 06/18/26, 23:21

    Fixed merge conflict in test
  21. core-ci voted on patch set 19 V +1 06/18/26, 23:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/103643

  22. Simon Schaufelberger voted on patch set 19 CR +1 V +1 06/23/26, 14:01

  23. Markus Gerdes voted on patch set 19 CR +1 06/23/26, 14:09

  24. Peter Kraume voted on patch set 19 CR +1 10/16/26, 08:40

  25. Benni Mack commented on patch set 19 11/18/26, 20:14