Review main Abandoned

96359[WIP][BUGFIX] Convert MM relation items to workspace versions again

Benjamin Franzke CR 0 V 0 Easy +41 −1 updated 11/09/26, 20:22

Commit message

RelationHandler::convertItemArray() replaces the live uids of related
records with the uids of their workspace versions before MM relations
are written in a workspace (#77375).

When the method moved to the Schema API, the condition
`empty($ids) || !BackendUtility::isTableWorkspaceEnabled($tableName)`
was split into separate checks, and the negation got lost:
`$schema->isWorkspaceAware()` now skips exactly the tables the
conversion is meant for. This has two effects in a workspace:

* Related records of workspace aware tables are no longer converted,
  so MM rows point to the live record instead of its version.
* Related records of tables without versioning are converted by
  mistake. PlainDataResolver returns their ids as a plain list, whose
  positions are then read as uids. With be_users 1 and 2 related, uid
  1 turns into 2, which either breaks with a duplicate MM row or
  silently points the relation to another record.

No test covered the conversion so far. Restore the negation and add
tests for both table types.

Review

  • Code review CR 0
  • Verified V 0
    • core-ci +1 CI

Issues 2

Files 2

Review log 34

  1. Benjamin Franzke uploaded patch set 1 10/05/26, 11:45

  2. core-ci voted on patch set 1 V +1 10/05/26, 11:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110110

  3. Benjamin Franzke marked it work in progress 10/16/26, 12:37

  4. Benjamin Franzke abandoned the change 11/09/26, 20:22