Review main Merged

77608[BUGFIX] Ensure proper history presentation of dbType "json" data

Stefan Bürk CR +2 V +2 Easy +11 −0 updated 02/01/23, 14:30

Commit message

Support for json database field has been added basicly
with #99062 and #99226. That popped up an issue with
handling data of this field in DataHandler, which has
been addressed within #99279.

First real usage of this new field type has been added
with the introduction of the new `ext:reactions`, which
is also the first battleground for this field type.

Using `ext:reactions` revealed an oversight regarding
the proper representation and handling of the "json"
field and data in the well known history&undo feature.
To create "human-readable" data representation the
`BackendUtilility::getProcessedValue()` method is used.
This method expects to return string of the represented
data, so it can compared by the diff utility. The value
for json fields are the decoded value, and is therefore
most likely an array.

This change used `json_encode()` to prepare the value
for the human-readable representation. This gives us
a nice view and avoids the issue with the annoying
array to string conversion warning.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Christian Kuhn +1
    • Stefan Froemken +1
    • Benni Mack +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Christian Kuhn +1
    • Stefan Froemken +1
    • core-ci +1 CI

Issues 5

Files 1

Review log 79

  1. Stefan Bürk uploaded patch set 1 01/25/23, 21:39

  2. Stefan Bürk updated the commit message in patch set 2 01/25/23, 21:46

  3. core-ci voted on patch set 1 V +1 01/25/23, 21:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36630

  4. core-ci voted on patch set 2 V +1 01/25/23, 21:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36631

  5. Stefan Froemken commented on patch set 2 V +1 CR +1 01/27/23, 20:02

    Looks good. History of other records is still working. Nice.
  6. Benni Mack voted on patch set 2 CR +1 01/31/23, 08:43

  7. Christian Kuhn voted on patch set 2 V +1 CR +1 02/01/23, 14:23

  8. Stefan Bürk voted on patch set 2 V +2 CR +2 02/01/23, 14:30

  9. Stefan Bürk merged patch set 3 02/01/23, 14:30