[TASK] Use suggestedInsertUids feature for new version placeholders 86/57986/2
authorOliver Hader <oliver@typo3.org>
Wed, 22 Aug 2018 09:17:31 +0000 (11:17 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Wed, 22 Aug 2018 10:26:00 +0000 (12:26 +0200)
The DataHandler::$suggestedInsertUids feature is currently only used
for regular live records, however not for new version placeholders -
which in fact are the pendant for a regular live records, with the
additional binding to a specific workspace context.

Resolves: #85921
Releases: master
Change-Id: I320ab26be3c60983640d3c5f61338689b9068209
Reviewed-on: https://review.typo3.org/57986
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Daniel Gorges <daniel.gorges@b13.de>
Tested-by: Daniel Gorges <daniel.gorges@b13.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/core/Classes/DataHandling/DataHandler.php

index f0bdead..b4b1b72 100644 (file)
@@ -1251,7 +1251,7 @@ class DataHandler implements LoggerAwareInterface
                             $newVersion_placeholderFieldArray['t3ver_wsid'] = $this->BE_USER->workspace;
                             $newVersion_placeholderFieldArray[$GLOBALS['TCA'][$table]['ctrl']['label']] = $this->getPlaceholderTitleForTableLabel($table);
                             // Saving placeholder as 'original'
-                            $this->insertDB($table, $id, $newVersion_placeholderFieldArray, false);
+                            $this->insertDB($table, $id, $newVersion_placeholderFieldArray, false, $incomingFieldArray['uid'] ?? 0);
                             // For the actual new offline version, set versioning values to point to placeholder:
                             $fieldArray['pid'] = -1;
                             $fieldArray['t3ver_oid'] = $this->substNEWwithIDs[$id];