[BUGFIX] Keep language reference for children using l10n_mode=exclude 29/59629/8
authorOliver Hader <oliver@typo3.org>
Mon, 4 Feb 2019 12:51:37 +0000 (13:51 +0100)
committerBenni Mack <benni@typo3.org>
Fri, 8 Feb 2019 08:33:15 +0000 (09:33 +0100)
commitef779ca4731b8333fb553ea52f9e0cc59d5cc7dd
tree0472dd455bbe72da12e5444af10d8876be3f95cb
parent9edad3e08bfc3b6e5cc354e6f8a83711a8ddbbd1
[BUGFIX] Keep language reference for children using l10n_mode=exclude

Having 1:n child associations being defined as l10n_mode=exclude on their
parent side, currently leads to deleting and recreating the child entity
(re-synchronization). For composite relations (children can only exist
with their parent - usually accessed through their parent as aggregate
root) this is "okay" in terms of domain-driven design.

However having large data-sets leads to performance impact during the
re-synchronization process.

In the current scenario children processed with l10n_mode=exclude did not
have any pointer to their language origin (due to l10n_parent not being
set). This change copies these children and applies the same values as
used for localizations - without actually invoking the localization
process.

For l10n_mode=exclude children this means, the sys_language_uid and
l10n_parent values are now set - which have been empty before.

Resolves: #87640
Releases: master, 9.5
Change-Id: I3d862f536603b9e49c7a5d3205ccfc2b4e2e9532
Reviewed-on: https://review.typo3.org/59629
Tested-by: TYPO3com <noreply@typo3.com>
Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de>
Tested-by: Daniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
12 files changed:
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/AbstractActionTestCase.php
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/ActionTest.php
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizePageNAddHotelChildWExclude.csv
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizePageTwiceWExclude.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizePageWExclude.csv
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/AbstractActionTestCase.php
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/ActionTest.php
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizePageNAddHotelChildWExclude.csv
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizePageTwiceWExclude.csv [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizePageWExclude.csv