Review 13.4 Merged

93922[BUGFIX] Avoid false-positive "version of a version" in DataHandler

Christian Kuhn CR +2 V +2 Normal +210 −6 updated 05/02/26, 21:57

Commit message

We knew #106382 was risky when we decided to merge it into
v14 and v13. It was worth it due to the structural improvement,
and the query reduction, even though a few issues had to be
fixed afterwards. Another one popped up now:

DataHandler->versionizeRecord() guards against creating a version
of an already-versioned record by rejecting rows with t3ver_oid > 0.
Since commit #106382 the row is fetched via BU::getRecord()
followed by BU::workspaceOL(). workspaceOL() legitimately swaps the
current-workspace overlay into $row, and that overlay by definition
has t3ver_oid > 0. The post-swap guard then fires whenever the user
already has an overlay for the live record, even though the
existing-overlay early return further down would have resolved
the call correctly.

The patch moves the t3ver_oid check ahead of workspaceOL() so it
operates on the row returned by getRecord(). A non-live input UID
still gets rejected. A live UID with an overlay in the current
workspace passes the check, falls through to the existing-overlay
early return, and resolves to that overlay - the behaviour we had
before the regression.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
  • Verified V +2 Done
    • Christian Kuhn +2
    • core-ci +1 CI

Issues 2

Files 10

Review log 34

  1. Christian Kuhn commented on patch set 1 05/02/26, 21:13

    Cherry Picked from branch 14.3.
  2. core-ci voted on patch set 1 V +1 05/02/26, 21:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/101416

  3. Christian Kuhn voted on patch set 1 CR +2 V +2 05/02/26, 21:57

  4. Christian Kuhn merged patch set 2 05/02/26, 21:57