Review main Merged

87595[BUGFIX] Align language of inline children with their parent

Sybille Peters CR +2 V +2 Expert +1059 −0 updated 10/17/26, 12:29

Commit message

Inline children (type "inline" and type "file") belong to exactly one
parent and must have the same language. This was not ensured:

* New children submitted together with their parent kept the
  language sent by the backend form, which is the language of the
  parent when the form was opened, not the one chosen before saving.
* New children added to an existing translated parent got the
  default language when no language was submitted for them.
* Existing children kept their language when the language of their
  parent was changed. Localizing such a parent afterward duplicated
  the children, or failed with "Child record was not processed"
  when language synchronization is enabled.

After all relations are resolved, DataHandler now aligns all children
of each record that was created, whose language was changed, or that
got new inline children submitted. Existing siblings of a new child
are aligned as well. The language stored for the parent is used, and
nested children follow their aligned parent independent of the order
of the data map. A child is aligned to a language at most once per
run, so invalid cyclic relations cannot loop endlessly. A child
aligned to the default language or to "all languages" also gets its
translation pointers reset.

Like the parent pointer and sorting DataHandler already writes to
inline children, the language is written without checking access to
the child table, its page or its language field, live as well as in
a workspace. In a workspace, only workspace versions of the children
are written.

Not covered: inline relations stored in an MM table (children are
not owned by one parent), changing the language of a child directly,
and existing inconsistent records until their parent is saved as
described above.

Review

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

Issues 8

Files 37

Show 17 more files

Review log 3855

Show 2030 earlier messages
  1. Sybille Peters uploaded patch set 1 12/28/24, 09:43

  2. Sybille Peters commented on patch set 1 12/28/24, 09:46

    The patch still needs (functional) tests.
    Are we allowed to have several Resolves here?
  3. Sybille Peters commented on patch set 1 V -1 12/28/24, 09:47

    Should manually test all referenced issues.
  4. Sybille Peters commented on patch set 1 12/28/24, 09:49

    Should we add an Upgrade Wizard to make sure existing records are fixed? Are we allowed to backport an Upgrade Wizard to version 13.4?
  5. core-ci voted on patch set 1 V -1 12/28/24, 09:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71665

  6. Sybille Peters uploaded patch set 2 V -1 12/28/24, 10:22

  7. Sybille Peters commented on patch set 1 V +1 12/28/24, 10:30

    Reply

    Manually tested and confirmed it resolves all issues: 81165, 88980, 103969, 103970
  8. core-ci voted on patch set 2 V -1 12/28/24, 10:31 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71666

  9. Sybille Peters uploaded patch set 3 V -1 12/28/24, 10:32

  10. core-ci voted on patch set 3 V -1 12/28/24, 10:41 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71667

  11. Sybille Peters uploaded patch set 4 V -1 12/28/24, 11:38

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

  13. Sybille Peters uploaded patch set 5 V -1 12/28/24, 11:53

  14. core-ci voted on patch set 5 V -1 12/28/24, 12:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71669

  15. Sybille Peters uploaded patch set 6 V -1 12/28/24, 12:10

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

  17. Sybille Peters uploaded patch set 7 V -1 12/29/24, 07:20

  18. core-ci voted on patch set 7 V +1 12/29/24, 07:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71692

  19. Sybille Peters uploaded patch set 8 V +1 12/29/24, 08:46

  20. Sybille Peters commented on patch set 8 12/29/24, 08:47

    Reply

    Tests have been added. Still missing tests for https://forge.typo3.org/issues/88980
  21. core-ci voted on patch set 8 V +1 12/29/24, 08:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71695

  22. Sybille Peters commented on patch set 8 12/29/24, 17:48

    Reply

    https://forge.typo3.org/issues/88980 will not occur if https://forge.typo3.org/issues/103970 is solved. Tests cover all cases.
  23. Garvin Hicking commented on patch set 8 12/30/24, 00:15

    That would be one great multi-resolve. I hope we can adress this. Thank you!

    Reply

    Yes, this is possible :-)
  24. Sybille Peters uploaded patch set 9 V +1 12/30/24, 09:38

  25. core-ci voted on patch set 9 V +1 12/30/24, 09:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71730

  26. Sybille Peters uploaded patch set 10 V +1 12/30/24, 10:11

  27. core-ci voted on patch set 10 V +1 12/30/24, 10:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71731

  28. Sybille Peters commented on patch set 10 CR -1 01/05/25, 08:34

    foreign_match_fields is currently not considered, it should be considered as well, see https://docs.typo3.org/m/typo3/reference-tca/main/en-us/ColumnsConfig/Type/Inline/Index.html#confval-inline-foreign-match-fields
  29. Sybille Peters commented on patch set 10 01/05/25, 08:36

    Currently, only parent / child relation with foreign_table / foreign_table_field / foreign_field in parent record is considered (see typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_foreignfield) Relations where foreign_table_field and foreign_field are not set and the relation stored as csv in parent field are not considered, see typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_csv/
  30. Sybille Peters commented on patch set 10 01/15/25, 10:28

    See also already merged similar patch for copying elements: "Sync language of inline children on copy": https://review.typo3.org/c/Packages/TYPO3.CMS/+/86773
  1. Benni Mack updated the commit message in patch set 11 CR -1 V +1 04/22/26, 06:30

  2. core-ci voted on patch set 11 V -1 04/22/26, 07:03 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100714

  3. Benni Mack marked it work in progress 10/07/26, 09:12

  4. Benni Mack commented on patch set 11 10/07/26, 09:12

    marking this as WIP, I think we need to look at each issue individually.
  5. Benni Mack uploaded patch set 12 V -1 10/13/26, 16:17

  6. core-ci voted on patch set 12 V +1 10/13/26, 16:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111014

  7. Benni Mack uploaded patch set 13 V +1 10/13/26, 20:00

  8. core-ci voted on patch set 13 V +1 10/13/26, 20:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111023

  9. Benni Mack marked it ready for review 10/13/26, 21:13

  10. Benni Mack commented on patch set 13 10/14/26, 06:29

    Reply

    lets handle this separately, as I've done with recent changes in DataHandler. Or we build it into e.g. dbdoctor?

    Reply

    this is now covered

    Reply

    this is now covered (CSV + foreign_field) except MM, which we should probably handle separately.

    Reply

    Done
  11. Benni Mack uploaded patch set 14 V +1 10/14/26, 08:21

  12. core-ci voted on patch set 14 V +1 10/14/26, 08:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111055

  13. Benni Mack uploaded patch set 15 V +1 10/15/26, 22:25

  14. Benni Mack uploaded patch set 16 10/15/26, 22:28

  15. Benni Mack wrote 10/15/26, 22:32

    Topic set to DataHandler
  16. core-ci voted on patch set 15 V +1 10/15/26, 22:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111290

  17. core-ci voted on patch set 16 V +1 10/15/26, 22:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111292

  18. Benni Mack uploaded patch set 17 V +1 10/16/26, 17:08

  19. Benni Mack marked it ready for review 10/16/26, 17:11

  20. Benni Mack voted on patch set 17 CR +1 V +1 10/16/26, 17:11

  21. Benni Mack commented on patch set 17 10/16/26, 17:12

    That was a lot of work - it was really worth it. Thank you, Sybille, for kickstarting this!
  22. core-ci voted on patch set 17 V +1 10/16/26, 17:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111385

  23. Benjamin Kott voted on patch set 17 CR +1 V +1 10/17/26, 12:23

  24. Benni Mack voted on patch set 17 CR +2 V +2 10/17/26, 12:29

  25. Benni Mack merged patch set 18 10/17/26, 12:29