Review 13.4 Merged

95534[BUGFIX] Do not treat moved records as deleted in record history

Benni Mack CR +2 V +2 Normal +169 −18 updated 09/01/26, 21:15

Commit message

RecordHistory->getDiff() builds the "insertsDeletes" map that drives
the rollback preview and RecordHistoryRollback->performRollback(). It
counted every action type except "modify", incrementing only when the
entry carried action "insert" and decrementing otherwise.

"action" is only set for add/undelete, delete and publish, so move and
stage change entries carried none at all, and publish carried a value
that is not "insert". All three were counted as deletions: a record
that was merely moved offered a rollback issuing an "undelete"
command, and two such entries summed to -2, which is handled by
neither the preview nor the rollback, silently dropping the entry.

Classify by action type instead. Only add and undelete count as an
insert, only delete as a delete. Move, stage change and publish do not
add or remove a record and are no longer counted.

performRollback() additionally read the map without checking that the
requested key exists.

Review

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

Issues 1

Files 3

Review log 34

  1. Benni Mack commented on patch set 1 09/01/26, 20:57

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

  3. Benni Mack voted on patch set 1 CR +2 V +2 09/01/26, 21:15

  4. Benni Mack merged patch set 2 09/01/26, 21:15