Review main Merged

93912[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
    • Oliver Klee +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Oliver Klee +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 2

Files 10

Review log 712

  1. Christian Kuhn uploaded patch set 1 05/02/26, 15:39

  2. core-ci voted on patch set 1 V +1 05/02/26, 15:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/101400

  3. Christian Kuhn uploaded patch set 2 V +1 05/02/26, 18:35

  4. core-ci voted on patch set 2 V -1 05/02/26, 18:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/101409

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

  6. Christian Kuhn updated the commit message in patch set 3 V +1 05/02/26, 19:24

  7. core-ci voted on patch set 3 V -1 05/02/26, 19:32 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/101413

  8. core-ci voted on patch set 3 V +1 05/02/26, 19:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/101413

  9. Stefan Bürk voted on patch set 3 CR +1 V +1 05/02/26, 20:03

  10. Oliver Klee voted on patch set 3 CR +1 V +1 05/02/26, 20:25

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

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