[FOLLOWUP][BUGFIX] Allow processing of multiple new record localizations 13/53213/3
authorOliver Hader <oliver@typo3.org>
Wed, 14 Jun 2017 16:28:59 +0000 (18:28 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Wed, 14 Jun 2017 17:07:14 +0000 (19:07 +0200)
Complete data-map for a table is handed over in $idValues to
DataMapProcessor::fetchDependencies(string $tableName, array $ids),
but should only contain the id-values - either integer or string.

Resolves: #80239
Releases: master, 8.7
Change-Id: If12562dad839687b7d60855fa99d9ffc21bc1167
Reviewed-on: https://review.typo3.org/53213
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

index 6161d61..5f27a1f 100644 (file)
@@ -175,7 +175,7 @@ class DataMapProcessor
 
         $dependencies = $this->fetchDependencies(
             $forTableName,
-            $this->filterNewItemIds($forTableName, $idValues)
+            $this->filterNewItemIds($forTableName, array_keys($idValues))
         );
 
         foreach ($idValues as $id => $values) {
@@ -809,8 +809,8 @@ class DataMapProcessor
         }
         $fieldNamesMap = array_combine($fieldNames, $fieldNames);
 
-        $persistedIds = $this->filterNumericIds(array_keys($ids), true);
-        $createdIds = $this->filterNumericIds(array_keys($ids), false);
+        $persistedIds = $this->filterNumericIds($ids, true);
+        $createdIds = $this->filterNumericIds($ids, false);
         $dependentElements = $this->fetchDependentElements($tableName, $persistedIds, $fieldNames);
 
         foreach ($createdIds as $createdId) {