Review main Merged

95536[BUGFIX] Use one correlation id for a record history rollback

Benni Mack CR +2 V +2 Normal +130 −2 updated 10/15/26, 08:22

Commit message

RecordHistoryRollback->performRollback() runs up to two DataHandler
instances: one for the command map that undeletes or deletes records,
and one for the data map that restores field values. Neither received
a CorrelationId, so both generated their own random correlation scope
and the sys_history entries of a single rollback could not be
recognised as belonging to one operation.

Hand the correlation id of the command map run over to the data map
run, so both write below the same scope.

The method also reused the local $data variable for two different
array shapes without resetting it in between. The command map block
fills it with "<table>:<uid>" => <int>, and for a single record or a
single field the data map block adds "<table>" => ["<uid>" => [...]]
on top. Rolling back a single record that was modified and then
deleted therefore handed a malformed data map to DataHandler, which
rejected it with UnexpectedValueException 1709035799.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Wouter Wolters +1
    • Sascha Nowak +1
  • Verified V +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Wouter Wolters +1
    • Sascha Nowak +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 78

  1. Benni Mack uploaded patch set 1 09/01/26, 21:03

  2. core-ci voted on patch set 1 V +1 09/01/26, 21:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107531

  3. Sascha Nowak voted on patch set 1 CR +1 V +1 09/02/26, 06:35

  4. Wouter Wolters commented on patch set 1 CR +1 V +1 09/02/26, 06:45

    Forgot to vote this one yesterday evening 😊
  5. Georg Ringer voted on patch set 1 CR +1 V +1 09/02/26, 06:53

  6. Benni Mack voted on patch set 1 CR +2 V +2 09/02/26, 06:57

  7. Benni Mack merged patch set 2 09/02/26, 06:57

  8. Benni Mack wrote 10/15/26, 08:22

    Hashtag added: no-backport