[BUGFIX] Set l10n_state before synchronizing fields 57/54657/8
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:17 +0000 (21:46 +0100)
commit31fa79ceee7d9a8c3e075d83f2348eb37361a3fc
tree700d2e6a10085665c69cbdb8fa8406a1a259e2d1
parentc1543fc2d69dd40c22cc18df55f9b7db95006654
[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/54657
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
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]