Review 14.3 Merged

97060[BUGFIX] Avoid duplicate MM rows when copying both relation sides

Benni Mack CR +2 V +2 Normal +106 −1 updated 10/23/26, 09:27

Commit message

When a page is copied that contains both sides of a bidirectional
MM relation (MM_opposite_field), the record copied first writes a
relation to the original of the other side. The record copied
afterwards picks up this relation as well, so remapping turns both
the original and the copy into the same uid. writeMM() then inserts
the relation twice, which nowadays fails with a unique constraint
violation and aborts the copy.

Remapping now drops such a stale item if the copy it maps to is
already part of the relation, and updates the relation count of
the record accordingly.

Review

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

Issues 2

Files 4

Review log 34

  1. Benni Mack commented on patch set 1 10/23/26, 08:58

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

  3. Benni Mack voted on patch set 1 CR +2 V +2 10/23/26, 09:27

  4. Benni Mack merged patch set 2 10/23/26, 09:27