Review 14.3 Merged

97614[BUGFIX] Export category relations in impexp

Benni Mack CR +2 V +2 Normal +122 −0 updated 11/13/26, 14:22

Commit message

Records with categories were exported without their category
relations. The exporter takes the relations of a record from
ReferenceIndex::getRelations(), and that deliberately returns
nothing for the side of an MM relation carrying
"MM_opposite_field" - which every category field with a
many-to-many relationship has.

The database column of such a field holds the number of
assigned categories, not a list of uids. Without the relation
in the export, the import took that number for a uid list and
related the record to whatever happened to have that uid,
usually the category with uid 1.

Category relations are now resolved by the exporter itself.
Other relations are untouched: the opposite side of an inline
MM relation keeps its column value of 0, so its records still
survive an export and import unchanged.

Review

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

Issues 1

Files 3

Review log 57

  1. Benni Mack commented on patch set 1 11/13/26, 13:46

    Cherry Picked from branch main. The following files contain Git conflicts: * typo3/sysext/impexp/Classes/Export.php
  2. core-ci voted on patch set 1 V -1 11/13/26, 13:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114324

  3. Benni Mack uploaded patch set 2 V -1 11/13/26, 14:05

  4. core-ci voted on patch set 2 V +1 11/13/26, 14:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114330

  5. Benni Mack marked it ready for review 11/13/26, 14:18

  6. Benni Mack voted on patch set 2 CR +2 V +2 11/13/26, 14:22

  7. Benni Mack merged patch set 3 11/13/26, 14:22