Review 14.3 Merged

96592[BUGFIX] Keep translated relations on import

Benjamin Kott CR +2 V +2 Expert +1173 −2 updated 10/10/26, 10:37

Commit message

Importing translated records whose inline or file field uses
l10n_mode=exclude, for example the images of a distribution's
translated content, failed with a TypeError in DataHandler.

EXT:impexp restores the relations of such records in one data-map, and
three things went wrong on the way:

  * The children still pointed to their parent by the uid it had in
    the export, which belongs to an unrelated record after the import.
    EXT:impexp now resets that pointer when it imports a child, and
    restores it from the field of the parent afterwards, as before.
  * DataMapProcessor took the "<table>_<uid>" form of the relations
    literally. It now resolves it, as it does for translation pointers
    already.
  * DataMapProcessor looked up the translations of the children in the
    database only, where their translation pointers are not stored
    yet. It now considers the pointers submitted in the same data-map.

So far, it deleted imported translated children, attached children to
the wrong translation or queued new children without a pid.

Independently of that, a new record whose pid cannot be resolved, as it
has none, points to a NEW id that was never stored or is to be placed
behind a record that does not exist, is now skipped with a logged error
instead of failing with a TypeError or PHP warnings. Such a record
cannot be stored anyway. This happens for example when an import could
not write the parent page.

Review

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

Issues 3

Files 11

Review log 34

  1. Benjamin Kott commented on patch set 1 10/10/26, 09:52

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 10/10/26, 10:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110785

  3. Benjamin Kott voted on patch set 1 CR +2 V +2 10/10/26, 10:37

  4. Benjamin Kott merged patch set 2 10/10/26, 10:37