Skip to content
Snippets Groups Projects
Commit aa3ee0e8 authored by Stefan Bürk's avatar Stefan Bürk Committed by Benni Mack
Browse files

[BUGFIX] Ensure inserted json data is properly checked in DataHandler

Native JSON field support along with a custom TCA user dbType
`json` has been added as new features. This has been used to
provide a more dynamic configuration in `ext:reactions` for
the field variable config.

Backend uses DataHandler to persist the data to the database,
and checks if the retrieved value matches the to-persist value.

At least MySQL seems to save provided array data by sorting it
by key, thus the check before-after does not match, because of
different key orderings. As it may be hard to ensure that
beforehand, this change sorts the persisted and the provided
array recursivly before comparing them. This ensures that at
least the "same" data is written to the database.

Resolves: #99279
Releases: main
Change-Id: Icafd9485888011350d89cf6cc7094c03dbf14e40
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/76927


Tested-by: default avatarFrank Nägler <frank.naegler@typo3.com>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarFrank Nägler <frank.naegler@typo3.com>
Tested-by: default avatarBenni Mack <benni@typo3.org>
parent cc60fe25
No related merge requests found
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