Review main Ready for review Quiet

97163[BUGFIX] Do not list or revert a workspace's own version-copy insert

Jure Milic CR 0 V 0 Normal +188 −0 updated 10/26/26, 09:29

Commit message

On a record's first save in a workspace, DataHandler silently creates
a workspace version of it and logs that creation as an ACTION_ADD in
sys_history, indistinguishable from a record actually created in the
workspace. RecordHistory::getDiff() treated every ACTION_ADD as an
insert, so reverting from that entry made RecordHistoryRollback mark
the live record for deletion instead of just undoing the editor's own
change.

The two cases are distinguishable from data already logged on the
row: insertDB() stores the row's own t3ver_oid in history_data, which
is > 0 for a version of an existing live record and 0 for a record
genuinely created in the workspace.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 1
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/63/97163/1 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/63/97163/1 && git cherry-pick FETCH_HEAD

Review

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

Merge conflicts 4

Issues 1

Files 3

Review log 12

  1. Jure Milic uploaded patch set 1 10/26/26, 09:17

  2. core-ci voted on patch set 1 V +1 10/26/26, 09:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112584