[BUGFIX] Set l10n_state before synchronizing fields 56/54656/9
authorHelmut Hummel <typo3@helhum.io>
Wed, 15 Nov 2017 17:17:49 +0000 (18:17 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Thu, 16 Nov 2017 20:46:29 +0000 (21:46 +0100)
commit693f270e18908d2ccfaf3f9852a15fbb972a9a6d
tree76e6d1b6f1f8a89a0f766f3d2a38f6b7f8f195ed
parent2abc42447b3ac853885b411392f436f9460ef929
[BUGFIX] Set l10n_state before synchronizing fields

L10nModeUpdater checks whether fields in translated records are
modified, thus not synchronized with the parent record and the
new l10n_state for this field is set to "custom" in this case
or "parent" if the field is empty.

However this is done after the data is synchronized, which
leads to wrong data being written by the DataMapProcessor.

To fix this, we move setting l10n_state upwards in the code,
so that relations and fields from translated records can be
updated correctly.

Resolves: #83006
Releases: master, 8.7
Change-Id: Ibb06eecb6cf743bd6bba1990ca6f9391c983821f
Reviewed-on: https://review.typo3.org/54656
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/install/Classes/Updates/RowUpdater/L10nModeUpdater.php
typo3/sysext/install/Tests/Functional/Updates/RowUpdater/DataSet/LiveDefaultElements.csv [new file with mode: 0644]
typo3/sysext/install/Tests/Functional/Updates/RowUpdater/DataSet/LiveDefaultPages.csv [new file with mode: 0644]
typo3/sysext/install/Tests/Functional/Updates/RowUpdater/DataSet/recordsCanBeUpdated.csv [new file with mode: 0644]
typo3/sysext/install/Tests/Functional/Updates/RowUpdater/L10nModeUpdaterTest.php [new file with mode: 0644]