[BUGFIX] Use proper Postgres types on inserting / updating rows
In early stage of TYPO3v11 the storage format for data in the TCA ctrl transOrigDiffSourceField database field, often called l18n_diffsource changed from PHP serialized data to JSON encoded storage format with #91906, mainly to mitigate general security risks. doctrine/dbal enquotes json data provided as string with backslashes if not the correct field type is provided, which emits a postgres sql error exception when inserting or updating these fields, which are of type 'bytea' when dbms Postgres is used. Various parts of the core deal with arbitrary tables and don't know if a column is int, text or lob, or whatever. Those are blindly updated/inserted, resulting in Postgres saying "no". MSSQL has been named pickier than postgres in the past on that for similar issues with these fields. To solve this for MSSQL a expensive workaround on several places through the core with #81498 to get a working state and leaving it open to find a better way with a eventual cache-layer for these database field schema informations, thus unsolved yet. As core suffers now from the same issue for Postgres since the changed storage format, this patch adopts the choosen MSSQL solution for Postgres. This is a first bugfix solution with the tradeoff to be more expensive but working. Additionally one test case is added to cover this issue basicly but should be extended and further tightend in a dedicated patch. Improving the schema handling should be picked up and proper engineered in a another dedicated patch. Resolves: #96940 Related: #91906 Related: #81498 Releases: main, 11.5 Change-Id: I250fa10c9c7e06ddd330f7ab64f7680f21f3b4cd Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73551 Tested-by:Stefan Bürk <stefan@buerk.tech> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Oliver Bartsch <bo@cedev.de> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Oliver Bartsch <bo@cedev.de>
Showing
- typo3/sysext/core/Classes/DataHandling/DataHandler.php 2 additions, 2 deletionstypo3/sysext/core/Classes/DataHandling/DataHandler.php
- typo3/sysext/core/Classes/Resource/Index/MetaDataRepository.php 4 additions, 2 deletions...sysext/core/Classes/Resource/Index/MetaDataRepository.php
- typo3/sysext/core/Tests/Functional/DataHandling/Regular/AbstractActionTestCase.php 16 additions, 0 deletions...unctional/DataHandling/Regular/AbstractActionTestCase.php
- typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/ActionTest.php 15 additions, 0 deletions...sts/Functional/DataHandling/Regular/Modify/ActionTest.php
- typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/DataSet/localizePageAndUpdateRecordWithMinorChangesInFullRetrievedRecord.csv 25 additions, 0 deletions...eAndUpdateRecordWithMinorChangesInFullRetrievedRecord.csv
- typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php 5 additions, 4 deletions...se/Classes/Persistence/Generic/Storage/Typo3DbBackend.php
- typo3/sysext/workspaces/Classes/Hook/DataHandlerHook.php 5 additions, 4 deletionstypo3/sysext/workspaces/Classes/Hook/DataHandlerHook.php
Please register or sign in to comment