[BUGFIX] DataMapProcessor::synchronizeInlineRelations removes entities 44/53544/4
authorOliver Hader <oliver@typo3.org>
Wed, 19 Jul 2017 10:52:41 +0000 (12:52 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Mon, 24 Jul 2017 20:21:10 +0000 (22:21 +0200)
commit8b143fa6c340e30d3ff68c62e5226ad92327c64d
tree36cdecec5a1daa48068f55a41d496df1aae05b12
parenta57ea45b63611bcc5bae408c70424bd2f1915407
[BUGFIX] DataMapProcessor::synchronizeInlineRelations removes entities

In case RelationHandler::readForeignField() is called with invalid UID
values for a parent record (e.g. zero, or non-numeric values), all records
might be selected if the database default value for a parent pointer field
is set to zero instead of NULL.

Besides that DataMapProcessor::synchronizeInlineRelations() uses the
mentioned RelationHandler method to resolve suggested and actually
persisted relations. The processing is adjusted to avoid invoking
RelationHandler using non-numeric parent pointer values.

Resolves: #81915
Releases: master, 8.7
Change-Id: I108501c69c9cdb732bb88526830f0f73f2d680af
Reviewed-on: https://review.typo3.org/53544
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: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php
typo3/sysext/core/Classes/Database/RelationHandler.php
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/localizeChildrenHStandaloneChildrenWAllChildrenSelectNLanguageSynchronization.csv [new file with mode: 0644]