[BUGFIX] DataMapProcessor::synchronizeInlineRelations removes entities 81/53581/2
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 21:17:31 +0000 (23:17 +0200)
commit93353f08d294b5f2806a6d02302694889ffb7ce9
treeb57425866300a8fcd483d1b5ef21f2a3a01ed1b3
parent1c2cad6a6de99ed91b137d0f30916f8eebd3919e
[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/53581
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/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]