Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.

Review main Work in progress Orphaned

67432[BUGFIX] Make BroadcastMessage.fromData() idempotent

Benjamin Franzke CR -2 V 0 Normal +43 −31 updated 11/29/21, 18:21

Commit message

BroadcastMessage.fromData() used to nest the entire data (which
includes a payload property itself) into another wrapping payload
property.
That caused a BroadcastMessage with a payload of {foo: "bar"}
to to end up with {payload: {foo: "bar"}} as payload, when
recreated using BroadcastMessage.fromData().

BroadcastMessage.fromData() is now fixed to preserve the correct
data structure and BroadcastMessage.createCustomEvent() is adapted
to retain the previous – additional – payload subproperty in order
to preserve backwards compatibility.

Also AjaxDataHandler is adapted to create local events with
BroadcastMessage.createCustomEvent(). This is possible, now that
local and remote BroadcastMessages are compatible.

SlugService is adapted to use the correct BroadcastMessage structure
and the changelog documentation is also fixed to refer to the correct
BroadcastMessage. The API has been explicitly marked as internal
and as possibly changing at any time, therefore it's not considered
breaking to fix this as a documentation bug.

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 9
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/32/67432/9 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/32/67432/9 && git cherry-pick FETCH_HEAD

Review

  • Code review CR -2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V 0

    Imported before Forger kept the single votes, the next import adds them.

Issues 2

Files 8