[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:Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Stefan Froemken <froemken@gmail.com> Reviewed-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Stefan Froemken <froemken@gmail.com>
Please register or sign in to comment