[BUGFIX] Sanitize undefined TCA columns required for data integrity 11/60511/4
authorOliver Hader <oliver@typo3.org>
Thu, 18 Apr 2019 11:17:39 +0000 (13:17 +0200)
committerGeorg Ringer <georg.ringer@gmail.com>
Wed, 24 Apr 2019 10:55:12 +0000 (12:55 +0200)
commit412308e4a7c9b7a6efb587c4858535f13b3a780a
treeba23abf3582294c7a7a46d7a8ce0ddc23d4fd9fe
parentc9a89537ff6810bb9f65ed83acd74c1de6bc9f18
[BUGFIX] Sanitize undefined TCA columns required for data integrity

TCA's 'ctrl' section allows to define several database columns that
shall be used to store according integrity information, such as the
current language or pointers to ancestors used during localization.

In case those names are not defined properly in TCA's 'columns'
section, several commands (like copy of localize) are executed,
but without actually maintaining these values in the database.

In order to ensure integrity, missing columns that are defined in
the 'ctrl' section but missing in the 'columns' section are applied
with the TCA type 'passthrough'. This applies to 'ctrl' properties

* origUid
* languageField
* translationSource
* transOrigPointerField

Resolves: #88057
Releases: master, 9.5
Change-Id: I39a28dc2e1eddafe6363b7dd633fd84968fc620f
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60511
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/core/Classes/Migrations/TcaMigration.php
typo3/sysext/core/Tests/Functional/DataHandling/Regular/AbstractActionTestCase.php
typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/ActionTest.php
typo3/sysext/core/Tests/Unit/Migrations/TcaMigrationTest.php