Skip to content
Snippets Groups Projects
Commit a947ed06 authored by Stefan Bürk's avatar Stefan Bürk
Browse files

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

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.

Resolves: #99277
Related: #98373
Related: #99279
Related: #99226
Related: #99062
Releases: main
Change-Id: I4d9b80c86b4cc8fe3e1f65a7b8a62d9bcfa1ef4f
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77608


Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarStefan Froemken <froemken@gmail.com>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarStefan Froemken <froemken@gmail.com>
parent 5ad44d20
Branches
Tags
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment