From a62bd59b6de5f7158c686295f36ead84c68a38e9 Mon Sep 17 00:00:00 2001
From: Christian Kuhn <lolli@schwarzbu.ch>
Date: Fri, 25 Sep 2020 14:10:43 +0200
Subject: [PATCH] [BUGFIX] Proper reference index updating on workspace publish

Yet another reference index bugfix: On workspace publish,
reference index is not properly triggered as already noted
in some of the .csv test files.
The patch moves some of the recently added methods from
DataHandler to ReferenceIndexUpdater and handles cases like
publish correctly.

Change-Id: Ieb1b466493ab67f3477249a421fbeae26d82310b
Resolves: #92476
Releases: master, 10.4
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65876
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Oliver Bartsch <bo@cedev.de>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Oliver Bartsch <bo@cedev.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
---
 .../core/Classes/DataHandling/DataHandler.php |  83 ++---------
 .../DataHandling/ReferenceIndexUpdater.php    | 130 ++++++++++++++++++
 .../Classes/Hook/DataHandlerHook.php          |  15 +-
 .../FAL/Publish/DataSet/copyContent.csv       |   3 +-
 .../DataSet/createContentWFileReference.csv   |   2 +-
 .../FAL/Publish/DataSet/deleteContent.csv     |   2 -
 .../FAL/Publish/DataSet/localizeContent.csv   |   2 +
 .../modifyContentNAddFileReference.csv        |   2 +-
 .../modifyContentNDeleteAllFileReference.csv  |   2 -
 .../modifyContentNDeleteFileReference.csv     |   3 +-
 .../FAL/PublishAll/DataSet/copyContent.csv    |   2 +
 .../DataSet/createContentWFileReference.csv   |   1 +
 .../FAL/PublishAll/DataSet/deleteContent.csv  |   2 -
 .../PublishAll/DataSet/localizeContent.csv    |   2 +
 .../modifyContentNAddFileReference.csv        |   1 +
 .../modifyContentNDeleteAllFileReference.csv  |   2 -
 .../modifyContentNDeleteFileReference.csv     |   3 +-
 .../ForeignField/Publish/DataSet/copyPage.csv |   7 +-
 .../copyPageWHotelBeforeParentContent.csv     |   7 +-
 .../Publish/DataSet/copyParentContent.csv     |   2 +-
 .../copyParentContentToDifferentPage.csv      |   1 +
 ...NCopyParentContentNHotelNOfferChildren.csv |   2 +
 ...alizeParentContentNHotelNOfferChildren.csv |   2 +
 ...reateParentContentNHotelNOfferChildren.csv |   1 +
 .../Publish/DataSet/deleteParentContent.csv   |   3 -
 .../localizeParentContentWAllChildren.csv     |   1 +
 .../DataSet/modifyParentNAddHotelChild.csv    |   1 +
 ...odifyParentNChangeHotelChildrenSorting.csv |   4 +-
 .../DataSet/modifyParentNDeleteHotelChild.csv |   3 -
 ...ntContentToDifferentPageNChangeSorting.csv |  12 +-
 .../PublishAll/DataSet/copyPage.csv           |   7 +-
 .../copyPageWHotelBeforeParentContent.csv     |   7 +-
 .../PublishAll/DataSet/copyParentContent.csv  |   1 +
 .../copyParentContentToDifferentPage.csv      |   1 +
 ...NCopyParentContentNHotelNOfferChildren.csv |   2 +
 ...alizeParentContentNHotelNOfferChildren.csv |   2 +
 ...reateParentContentNHotelNOfferChildren.csv |   1 +
 .../DataSet/deleteParentContent.csv           |   3 -
 .../localizeParentContentWAllChildren.csv     |   1 +
 .../DataSet/modifyParentNAddHotelChild.csv    |   1 +
 ...odifyParentNChangeHotelChildrenSorting.csv |   4 +-
 .../DataSet/modifyParentNDeleteHotelChild.csv |   2 -
 ...ntContentToDifferentPageNChangeSorting.csv |  14 +-
 .../DataSet/createContentNCreateRelation.csv  |   2 +-
 .../createContentWCategoryNAddRelation.csv    |   2 +-
 .../DataSet/createCategoryNCreateRelation.csv |   2 +-
 .../createCategoryWContentNAddRelation.csv    |   2 +-
 .../DataSet/createContentNCreateRelation.csv  |   2 +-
 .../createContentWCategoryNAddRelation.csv    |   2 +-
 .../DataSet/modifyBothsOfRelation.csv         |   2 +-
 50 files changed, 221 insertions(+), 142 deletions(-)

diff --git a/typo3/sysext/core/Classes/DataHandling/DataHandler.php b/typo3/sysext/core/Classes/DataHandling/DataHandler.php
index 38333453172b..d2d8266bbbc7 100644
--- a/typo3/sysext/core/Classes/DataHandling/DataHandler.php
+++ b/typo3/sysext/core/Classes/DataHandling/DataHandler.php
@@ -532,13 +532,6 @@ class DataHandler implements LoggerAwareInterface
      */
     protected $remapStackActions = [];
 
-    /**
-     * Array used for executing post-processing on the reference index
-     *
-     * @var array
-     */
-    protected $remapStackRefIndex = [];
-
     /**
      * Registry object to gather reference index update requests and perform updates after
      * main processing has been done. The first call to start() instantiates this object.
@@ -4790,6 +4783,7 @@ class DataHandler implements LoggerAwareInterface
      */
     public function deleteRecord($table, $uid, $noRecordCheck = false, $forceHardDelete = false, $undeleteRecord = false)
     {
+        $currentUserWorkspace = (int)$this->BE_USER->workspace;
         $uid = (int)$uid;
         if (!$GLOBALS['TCA'][$table] || !$uid) {
             $this->log($table, $uid, SystemLogDatabaseAction::DELETE, 0, SystemLogErrorClassification::USER_ERROR, 'Attempt to delete record without delete-permissions. [' . $this->BE_USER->errorMsg . ']');
@@ -4895,7 +4889,7 @@ class DataHandler implements LoggerAwareInterface
         // Update reference index with table/uid on left side (recuid)
         $this->updateRefIndex($table, $uid);
         // Update reference index with table/uid on right side (ref_uid). Important if children of a relation are deleted / undeleted.
-        $this->registerReferenceUpdatesForReferencesToItem($table, $uid);
+        $this->referenceIndexUpdater->registerUpdateForReferencesToItem($table, $uid, $currentUserWorkspace);
     }
 
     /**
@@ -5421,7 +5415,7 @@ class DataHandler implements LoggerAwareInterface
         $this->discardRecordRelations($table, $versionRecord);
         $this->hardDeleteSingleRecord($table, (int)$versionRecord['uid']);
         $this->deletedRecords[$table][] = (int)$versionRecord['uid'];
-        $this->dropReferenceIndexRowsForRecord($table, (int)$versionRecord['uid']);
+        $this->registerReferenceIndexRowsForDrop($table, (int)$versionRecord['uid'], $userWorkspace);
         $this->getRecordHistoryStore()->deleteRecord($table, (int)$versionRecord['uid'], $this->correlationId);
         $this->log(
             $table,
@@ -6201,18 +6195,10 @@ class DataHandler implements LoggerAwareInterface
                 }
             }
         }
-        // Processes the reference index updates of the remap stack:
-        foreach ($this->remapStackRefIndex as $table => $idArray) {
-            foreach ($idArray as $id) {
-                $this->updateRefIndex($table, $id);
-                unset($this->remapStackRefIndex[$table][$id]);
-            }
-        }
         // Reset:
         $this->remapStack = [];
         $this->remapStackRecords = [];
         $this->remapStackActions = [];
-        $this->remapStackRefIndex = [];
     }
 
     /**
@@ -6304,18 +6290,6 @@ class DataHandler implements LoggerAwareInterface
         ];
     }
 
-    /**
-     * Adds a table-id-pair to the reference index remapping stack.
-     *
-     * @param string $table
-     * @param int $id
-     * @internal should only be used from within DataHandler
-     */
-    public function addRemapStackRefIndex($table, $id)
-    {
-        $this->remapStackRefIndex[$table][$id] = $id;
-    }
-
     /**
      * If a parent record was versionized on a workspace in $this->process_datamap,
      * it might be possible, that child records (e.g. on using IRRE) were affected.
@@ -7272,36 +7246,15 @@ class DataHandler implements LoggerAwareInterface
      *
      * @param string $table Table name
      * @param int $uid Record UID
+     * @param int $workspace Workspace the record lives in
      * @internal should only be used from within DataHandler
      */
-    public function updateRefIndex($table, $uid): void
+    public function updateRefIndex($table, $uid, int $workspace = null): void
     {
-        $this->referenceIndexUpdater->registerForUpdate((string)$table, (int)$uid, (int)$this->BE_USER->workspace);
-    }
-
-    /**
-     * Find reference index rows pointing to given table/uid combination and register them for update.
-     * Important in delete scenarios where a child is deleted to make sure any references to this child are dropped, too.
-     *
-     * @param string $table Table name, used as ref_table
-     * @param int $uid Record uid, used as ref_uid
-     */
-    protected function registerReferenceUpdatesForReferencesToItem(string $table, int $uid): void
-    {
-        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_refindex');
-        $statement = $queryBuilder
-            ->select('tablename', 'recuid')
-            ->from('sys_refindex')
-            ->where(
-                $queryBuilder->expr()->eq('ref_table', $queryBuilder->createNamedParameter($table, \PDO::PARAM_STR)),
-                $queryBuilder->expr()->eq('ref_uid', $queryBuilder->createNamedParameter($uid, \PDO::PARAM_INT)),
-                $queryBuilder->expr()->eq('deleted', $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT)),
-                $queryBuilder->expr()->eq('workspace', $queryBuilder->createNamedParameter((int)$this->BE_USER->workspace, \PDO::PARAM_INT))
-            )
-            ->execute();
-        while ($row = $statement->fetch()) {
-            $this->updateRefIndex($row['tablename'], (int)$row['recuid']);
+        if ($workspace === null) {
+            $workspace = (int)$this->BE_USER->workspace;
         }
+        $this->referenceIndexUpdater->registerForUpdate((string)$table, (int)$uid, $workspace);
     }
 
     /**
@@ -7312,25 +7265,11 @@ class DataHandler implements LoggerAwareInterface
      *
      * @param string $table Table name, used as tablename and ref_table
      * @param int $uid Record uid, used as recuid and ref_uid
+     * @param int $workspace Workspace the record lives in
      */
-    protected function dropReferenceIndexRowsForRecord(string $table, int $uid): void
+    public function registerReferenceIndexRowsForDrop(string $table, int $uid, int $workspace): void
     {
-        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_refindex');
-        $queryBuilder->delete('sys_refindex')
-            ->where(
-                $queryBuilder->expr()->eq('workspace', $queryBuilder->createNamedParameter((int)$this->BE_USER->workspace, \PDO::PARAM_INT)),
-                $queryBuilder->expr()->orX(
-                    $queryBuilder->expr()->andX(
-                        $queryBuilder->expr()->eq('tablename', $queryBuilder->createNamedParameter($table)),
-                        $queryBuilder->expr()->eq('recuid', $queryBuilder->createNamedParameter($uid, \PDO::PARAM_INT))
-                    ),
-                    $queryBuilder->expr()->andX(
-                        $queryBuilder->expr()->eq('ref_table', $queryBuilder->createNamedParameter($table)),
-                        $queryBuilder->expr()->eq('ref_uid', $queryBuilder->createNamedParameter($uid, \PDO::PARAM_INT))
-                    )
-                )
-            )
-            ->execute();
+        $this->referenceIndexUpdater->registerForDrop($table, $uid, $workspace);
     }
 
     /*********************************************
diff --git a/typo3/sysext/core/Classes/DataHandling/ReferenceIndexUpdater.php b/typo3/sysext/core/Classes/DataHandling/ReferenceIndexUpdater.php
index 18bb762eb13d..806a800d1c9d 100644
--- a/typo3/sysext/core/Classes/DataHandling/ReferenceIndexUpdater.php
+++ b/typo3/sysext/core/Classes/DataHandling/ReferenceIndexUpdater.php
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Core\DataHandling;
 
 use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Core\Database\ConnectionPool;
 use TYPO3\CMS\Core\Database\ReferenceIndex;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
@@ -38,6 +39,23 @@ class ReferenceIndexUpdater
      */
     protected $updateRegistry = [];
 
+    /**
+     * [ workspaceId => [ tableName => [
+     *      'uid' => uid,
+     *      'targetWorkspace' => $targetWorkspace
+     * ] ] ]
+     *
+     * @var array<int, array<string, array<int, array<string, string|int>>>>
+     */
+    protected $updateRegistryToItem = [];
+
+    /**
+     * [ workspaceId => [ tableName => [ uid ] ] ]
+     *
+     * @var array<int, array<string, array<int, int>>>
+     */
+    protected $dropRegistry = [];
+
     /**
      * Register a workspace/table/uid row for update
      *
@@ -61,11 +79,123 @@ class ReferenceIndexUpdater
         }
     }
 
+    /**
+     * Find reference index rows pointing to given table/uid combination and register them for update. Important in
+     * delete and publish scenarios where a child is deleted to make sure any references to this child are dropped, too.
+     * In publish scenarios reference index may exist for a non live workspace, but should be updated for live workspace.
+     * The optional $targetWorkspace argument is used for this.
+     *
+     * @param string $table Table name, used as ref_table
+     * @param int $uid Record uid, used as ref_uid
+     * @param int $workspace The workspace given record lives in
+     * @param int $targetWorkspace The target workspace the record has been swapped to
+     */
+    public function registerUpdateForReferencesToItem(string $table, int $uid, int $workspace, int $targetWorkspace = null): void
+    {
+        if ($workspace && !BackendUtility::isTableWorkspaceEnabled($table)) {
+            // If a user is in some workspace and changes relations of not workspace aware
+            // records, the reference index update needs to be performed as if the user
+            // is in live workspace. This is detected here and the update is registered for live.
+            $workspace = 0;
+        }
+        if ($targetWorkspace === null) {
+            $targetWorkspace = $workspace;
+        }
+        if (!isset($this->updateRegistryToItem[$workspace][$table])) {
+            $this->updateRegistryToItem[$workspace][$table] = [];
+        }
+        $recordAndTargetWorkspace = [
+            'uid' => $uid,
+            'targetWorkspace' => $targetWorkspace
+        ];
+        if (!in_array($recordAndTargetWorkspace, $this->updateRegistryToItem[$workspace][$table], true)) {
+            $this->updateRegistryToItem[$workspace][$table][] = $recordAndTargetWorkspace;
+        }
+    }
+
+    /**
+     * Delete rows from sys_refindex a table / uid combination is involved in:
+     * Either on left side (tablename + recuid) OR right side (ref_table + ref_uid).
+     * Useful in scenarios like workspace-discard where parents or children are hard deleted: The
+     * expensive updateRefIndex() does not need to be called since we can just drop straight ahead.
+     *
+     * @param string $table Table name, used as tablename and ref_table
+     * @param int $uid Record uid, used as recuid and ref_uid
+     * @param int $workspace Workspace the record lives in
+     */
+    public function registerForDrop(string $table, int $uid, int $workspace): void
+    {
+        if ($workspace && !BackendUtility::isTableWorkspaceEnabled($table)) {
+            // If a user is in some workspace and changes relations of not workspace aware
+            // records, the reference index update needs to be performed as if the user
+            // is in live workspace. This is detected here and the update is registered for live.
+            $workspace = 0;
+        }
+        if (!isset($this->dropRegistry[$workspace][$table])) {
+            $this->dropRegistry[$workspace][$table] = [];
+        }
+        if (!in_array($uid, $this->dropRegistry[$workspace][$table], true)) {
+            $this->dropRegistry[$workspace][$table][] = $uid;
+        }
+    }
+
     /**
      * Perform the reference index update operations
      */
     public function update(): void
     {
+        // Register updates to an item for update
+        foreach ($this->updateRegistryToItem as $workspace => $tableArray) {
+            foreach ($tableArray as $table => $recordArray) {
+                foreach ($recordArray as $item) {
+                    $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_refindex');
+                    $statement = $queryBuilder
+                        ->select('tablename', 'recuid')
+                        ->from('sys_refindex')
+                        ->where(
+                            $queryBuilder->expr()->eq('ref_table', $queryBuilder->createNamedParameter($table)),
+                            $queryBuilder->expr()->eq('ref_uid', $queryBuilder->createNamedParameter($item['uid'], \PDO::PARAM_INT)),
+                            $queryBuilder->expr()->eq('deleted', $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT)),
+                            $queryBuilder->expr()->eq('workspace', $queryBuilder->createNamedParameter($workspace, \PDO::PARAM_INT))
+                        )
+                        ->execute();
+                    while ($row = $statement->fetch()) {
+                        $this->registerForUpdate($row['tablename'], (int)$row['recuid'], $item['targetWorkspace']);
+                    }
+                }
+            }
+        }
+        $this->updateRegistryToItem = [];
+
+        // Drop rows from reference index if requested. Note this is performed *after* update-to-item, to
+        // find rows pointing to a record and register updates before rows are dropped. Needed if a record
+        // changes the workspace during publish: In this case all records pointing to the record in a workspace
+        // need to be registered for update for live workspace and after that the workspace rows can be dropped.
+        foreach ($this->dropRegistry as $workspace => $tableArray) {
+            foreach ($tableArray as $table => $uidArray) {
+                foreach ($uidArray as $uid) {
+                    $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_refindex');
+                    $queryBuilder->delete('sys_refindex')
+                        ->where(
+                            $queryBuilder->expr()->eq('workspace', $queryBuilder->createNamedParameter($workspace, \PDO::PARAM_INT)),
+                            $queryBuilder->expr()->orX(
+                                $queryBuilder->expr()->andX(
+                                    $queryBuilder->expr()->eq('tablename', $queryBuilder->createNamedParameter($table)),
+                                    $queryBuilder->expr()->eq('recuid', $queryBuilder->createNamedParameter($uid, \PDO::PARAM_INT))
+                                ),
+                                $queryBuilder->expr()->andX(
+                                    $queryBuilder->expr()->eq('ref_table', $queryBuilder->createNamedParameter($table)),
+                                    $queryBuilder->expr()->eq('ref_uid', $queryBuilder->createNamedParameter($uid, \PDO::PARAM_INT))
+                                )
+                            )
+                        )
+                        ->execute();
+                }
+            }
+        }
+        $this->dropRegistry = [];
+
+        // Perform reference index updates
         $referenceIndex = GeneralUtility::makeInstance(ReferenceIndex::class);
         $referenceIndex->enableRuntimeCache();
         foreach ($this->updateRegistry as $workspace => $tableArray) {
diff --git a/typo3/sysext/workspaces/Classes/Hook/DataHandlerHook.php b/typo3/sysext/workspaces/Classes/Hook/DataHandlerHook.php
index 8fdeb49e6993..3ab46f91804e 100644
--- a/typo3/sysext/workspaces/Classes/Hook/DataHandlerHook.php
+++ b/typo3/sysext/workspaces/Classes/Hook/DataHandlerHook.php
@@ -24,7 +24,6 @@ use TYPO3\CMS\Core\Context\WorkspaceAspect;
 use TYPO3\CMS\Core\Database\Connection;
 use TYPO3\CMS\Core\Database\ConnectionPool;
 use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
-use TYPO3\CMS\Core\Database\ReferenceIndex;
 use TYPO3\CMS\Core\Database\RelationHandler;
 use TYPO3\CMS\Core\DataHandling\DataHandler;
 use TYPO3\CMS\Core\DataHandling\PlaceholderShadowColumnsResolver;
@@ -775,8 +774,6 @@ class DataHandlerHook
                 $dataHandler->log($table, $id, SystemLogGenericAction::UNDEFINED, 0, SystemLogErrorClassification::MESSAGE, 'Publishing successful for table "' . $table . '" uid ' . $id . '=>' . $swapWith, -1, [], $dataHandler->eventPid($table, $id, $swapVersion['pid']));
             }
 
-            // Update reference index of the live record:
-            $dataHandler->addRemapStackRefIndex($table, $id);
             // Set log entry for live record:
             $propArr = $dataHandler->getRecordPropertiesFromRow($table, $swapVersion);
             if (($propArr['t3ver_oid'] ?? 0) > 0) {
@@ -786,8 +783,6 @@ class DataHandlerHook
             }
             $theLogId = $dataHandler->log($table, $id, DatabaseAction::UPDATE, $propArr['pid'], SystemLogErrorClassification::MESSAGE, $label, 10, [$propArr['header'], $table . ':' . $id], $propArr['event_pid']);
             $dataHandler->setHistory($table, $id, $theLogId);
-            // Update reference index of the offline record:
-            $dataHandler->addRemapStackRefIndex($table, $swapWith);
             // Set log entry for offline record:
             $propArr = $dataHandler->getRecordPropertiesFromRow($table, $curVersion);
             if (($propArr['t3ver_oid'] ?? 0) > 0) {
@@ -824,12 +819,10 @@ class DataHandlerHook
                 $dataHandler->deleteEl($table, $swapWith, true, true);
             }
 
-            // Update reference index for live workspace too:
-            /** @var \TYPO3\CMS\Core\Database\ReferenceIndex $refIndexObj */
-            $refIndexObj = GeneralUtility::makeInstance(ReferenceIndex::class);
-            $refIndexObj->setWorkspaceId(0);
-            $refIndexObj->updateRefIndexTable($table, $id);
-            $refIndexObj->updateRefIndexTable($table, $swapWith);
+            // Update reference index of the live record - which could have been a workspace record in case 'new'
+            $dataHandler->updateRefIndex($table, $id, 0);
+            // The 'swapWith' record has been deleted, so we can drop any reference index the record is involved in
+            $dataHandler->registerReferenceIndexRowsForDrop($table, $swapWith, (int)$dataHandler->BE_USER->workspace);
         }
     }
 
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/copyContent.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/copyContent.csv
index f90b37ce8f91..da22994bfbec 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/copyContent.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/copyContent.csv
@@ -30,4 +30,5 @@
 ,"ceaebd2148901a6d7b0a52c546aa5218","tt_content",331,"image",1,0,0,"sys_file_reference",129,,,,,,,,,,,
 ,"737779e2835b33067cc6141faf19343e","sys_file_reference",130,"uid_local",0,0,0,"sys_file",21,,,,,,,,,,,
 ,"96faaba988970bfcd00b334d8925b5ec","sys_file_reference",132,"uid_local",0,0,0,"sys_file",1,,,,,,,,,,,
-# @todo: tt_content:332 -> sys_file_reference:130 & 132 missing. Similar in localizeContent.csv and others.
+,"7f0edf5e6a8704b7825f934cf264f3d6","tt_content",332,"image",0,0,0,"sys_file_reference",130,,,,,,,,,,,
+,"01ab20f517d1e81ea1ba24e62561c039","tt_content",332,"image",1,0,0,"sys_file_reference",132,,,,,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/createContentWFileReference.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/createContentWFileReference.csv
index 78fc8517d248..8851687e9cf9 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/createContentWFileReference.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/createContentWFileReference.csv
@@ -27,5 +27,5 @@
 ,"fc208fc9d55a71b2faa9f4e4d4fa941d","tt_content",330,"image",1,0,0,"sys_file_reference",126,,,,,,,,,,,
 ,"48540de7710e3082f347bdd65ca340f2","tt_content",331,"image",0,0,0,"sys_file_reference",128,,,,,,,,,,,
 ,"ceaebd2148901a6d7b0a52c546aa5218","tt_content",331,"image",1,0,0,"sys_file_reference",129,,,,,,,,,,,
-# @todo: tt_content:332 -> sys_file_reference:130 missing
 ,"bb218c2fe53f7e399a6677966d9e24ab","sys_file_reference",130,"uid_local",0,0,0,"sys_file",1,,,,,,,,,,,
+,"7f0edf5e6a8704b7825f934cf264f3d6","tt_content",332,"image",0,0,0,"sys_file_reference",130,,,,,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/deleteContent.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/deleteContent.csv
index a03f51caaca4..a83101da2827 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/deleteContent.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/deleteContent.csv
@@ -21,7 +21,5 @@
 ,"8e50f38980afa6f4e84530b12f9cd0b3","sys_file_reference",127,"uid_local",0,0,0,"sys_file",21,,,,,,,,,,,
 ,"a1f2ffdc6bf235cb5516c4bfdeec5552","tt_content",330,"image",0,0,0,"sys_file_reference",127,,,,,,,,,,,
 ,"fc208fc9d55a71b2faa9f4e4d4fa941d","tt_content",330,"image",1,0,0,"sys_file_reference",126,,,,,,,,,,,
-,"a8fb2431cb23053f2b64e01cac99f0aa","tt_content",331,"image",0,1,0,"sys_file_reference",128,,,,,,,,,,,
-,"8f2b8f3b69dc6adb57e7a8fd642dc759","tt_content",331,"image",1,1,0,"sys_file_reference",129,,,,,,,,,,,
 ,"0b7edf2205371519698cdfbf6e0cc6e7","sys_file_reference",128,"uid_local",0,1,0,"sys_file",21,,,,,,,,,,,
 ,"fb266d0b94cee39b87fe03b9b7875c25","sys_file_reference",129,"uid_local",0,1,0,"sys_file",1,,,,,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/localizeContent.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/localizeContent.csv
index 4503f4b65f9e..f841d59d0b4d 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/localizeContent.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/localizeContent.csv
@@ -37,3 +37,5 @@
 ,"9290dcb69ef23b84311bf19bfde278ee","sys_file_reference",132,"sys_language_uid",0,0,0,"sys_language",1,,,,,,,,,,,
 ,"8535295b134627a7c3c55d311f8211a5","sys_file_reference",132,"l10n_parent",0,0,0,"sys_file_reference",129,,,,,,,,,,,
 ,"96faaba988970bfcd00b334d8925b5ec","sys_file_reference",132,"uid_local",0,0,0,"sys_file",1,,,,,,,,,,,
+,"7f0edf5e6a8704b7825f934cf264f3d6","tt_content",332,"image",0,0,0,"sys_file_reference",130,,,,,,,,,,,
+,"01ab20f517d1e81ea1ba24e62561c039","tt_content",332,"image",1,0,0,"sys_file_reference",132,,,,,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/modifyContentNAddFileReference.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/modifyContentNAddFileReference.csv
index 53a2c39a2265..8eff122708c2 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/modifyContentNAddFileReference.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/modifyContentNAddFileReference.csv
@@ -26,5 +26,5 @@
 ,"fc208fc9d55a71b2faa9f4e4d4fa941d","tt_content",330,"image",1,0,0,"sys_file_reference",126,,,,,,,,,,,
 ,"48540de7710e3082f347bdd65ca340f2","tt_content",331,"image",0,0,0,"sys_file_reference",128,,,,,,,,,,,
 ,"ceaebd2148901a6d7b0a52c546aa5218","tt_content",331,"image",1,0,0,"sys_file_reference",129,,,,,,,,,,,
-# @todo: tt_content:331 -> sys_file_reference:132 missing
 ,"96faaba988970bfcd00b334d8925b5ec","sys_file_reference",132,"uid_local",0,0,0,"sys_file",1,,,,,,,,,,,
+,"47b0249cf756eea3d76b532194ca4fe7","tt_content",331,"image",2,0,0,"sys_file_reference",132,,,,,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/modifyContentNDeleteAllFileReference.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/modifyContentNDeleteAllFileReference.csv
index d8d0378cfc99..f690519e9e09 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/modifyContentNDeleteAllFileReference.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/modifyContentNDeleteAllFileReference.csv
@@ -21,7 +21,5 @@
 ,"8e50f38980afa6f4e84530b12f9cd0b3","sys_file_reference",127,"uid_local",0,0,0,"sys_file",21,,,,,,,,,,,
 ,"a1f2ffdc6bf235cb5516c4bfdeec5552","tt_content",330,"image",0,0,0,"sys_file_reference",127,,,,,,,,,,,
 ,"fc208fc9d55a71b2faa9f4e4d4fa941d","tt_content",330,"image",1,0,0,"sys_file_reference",126,,,,,,,,,,,
-,"48540de7710e3082f347bdd65ca340f2","tt_content",331,"image",0,0,0,"sys_file_reference",128,,,,,,,,,,,
-,"ceaebd2148901a6d7b0a52c546aa5218","tt_content",331,"image",1,0,0,"sys_file_reference",129,,,,,,,,,,,
 ,"0b7edf2205371519698cdfbf6e0cc6e7","sys_file_reference",128,"uid_local",0,1,0,"sys_file",21,,,,,,,,,,,
 ,"fb266d0b94cee39b87fe03b9b7875c25","sys_file_reference",129,"uid_local",0,1,0,"sys_file",1,,,,,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/modifyContentNDeleteFileReference.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/modifyContentNDeleteFileReference.csv
index 2677c43ffaa7..4364ee242fb7 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/modifyContentNDeleteFileReference.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/modifyContentNDeleteFileReference.csv
@@ -22,6 +22,5 @@
 ,"c08c2538c324b0a98b0957bc4bdf36ae","sys_file_reference",129,"uid_local",0,0,0,"sys_file",1,,,,,,,,,,,
 ,"a1f2ffdc6bf235cb5516c4bfdeec5552","tt_content",330,"image",0,0,0,"sys_file_reference",127,,,,,,,,,,,
 ,"fc208fc9d55a71b2faa9f4e4d4fa941d","tt_content",330,"image",1,0,0,"sys_file_reference",126,,,,,,,,,,,
-,"48540de7710e3082f347bdd65ca340f2","tt_content",331,"image",0,0,0,"sys_file_reference",128,,,,,,,,,,,
-,"ceaebd2148901a6d7b0a52c546aa5218","tt_content",331,"image",1,0,0,"sys_file_reference",129,,,,,,,,,,,
 ,"0b7edf2205371519698cdfbf6e0cc6e7","sys_file_reference",128,"uid_local",0,1,0,"sys_file",21,,,,,,,,,,,
+,"997297edc2047a0fd48ffc237299a902","tt_content",331,"image",0,0,0,"sys_file_reference",129,,,,,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/copyContent.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/copyContent.csv
index d71697f64f84..da22994bfbec 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/copyContent.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/copyContent.csv
@@ -30,3 +30,5 @@
 ,"ceaebd2148901a6d7b0a52c546aa5218","tt_content",331,"image",1,0,0,"sys_file_reference",129,,,,,,,,,,,
 ,"737779e2835b33067cc6141faf19343e","sys_file_reference",130,"uid_local",0,0,0,"sys_file",21,,,,,,,,,,,
 ,"96faaba988970bfcd00b334d8925b5ec","sys_file_reference",132,"uid_local",0,0,0,"sys_file",1,,,,,,,,,,,
+,"7f0edf5e6a8704b7825f934cf264f3d6","tt_content",332,"image",0,0,0,"sys_file_reference",130,,,,,,,,,,,
+,"01ab20f517d1e81ea1ba24e62561c039","tt_content",332,"image",1,0,0,"sys_file_reference",132,,,,,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/createContentWFileReference.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/createContentWFileReference.csv
index f5f465cb93e0..8851687e9cf9 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/createContentWFileReference.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/createContentWFileReference.csv
@@ -28,3 +28,4 @@
 ,"48540de7710e3082f347bdd65ca340f2","tt_content",331,"image",0,0,0,"sys_file_reference",128,,,,,,,,,,,
 ,"ceaebd2148901a6d7b0a52c546aa5218","tt_content",331,"image",1,0,0,"sys_file_reference",129,,,,,,,,,,,
 ,"bb218c2fe53f7e399a6677966d9e24ab","sys_file_reference",130,"uid_local",0,0,0,"sys_file",1,,,,,,,,,,,
+,"7f0edf5e6a8704b7825f934cf264f3d6","tt_content",332,"image",0,0,0,"sys_file_reference",130,,,,,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/deleteContent.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/deleteContent.csv
index ad2289a2a837..a83101da2827 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/deleteContent.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/deleteContent.csv
@@ -23,5 +23,3 @@
 ,"fc208fc9d55a71b2faa9f4e4d4fa941d","tt_content",330,"image",1,0,0,"sys_file_reference",126,,,,,,,,,,,
 ,"0b7edf2205371519698cdfbf6e0cc6e7","sys_file_reference",128,"uid_local",0,1,0,"sys_file",21,,,,,,,,,,,
 ,"fb266d0b94cee39b87fe03b9b7875c25","sys_file_reference",129,"uid_local",0,1,0,"sys_file",1,,,,,,,,,,,
-,"a8fb2431cb23053f2b64e01cac99f0aa","tt_content",331,"image",0,1,0,"sys_file_reference",128,,,,,,,,,,,
-,"8f2b8f3b69dc6adb57e7a8fd642dc759","tt_content",331,"image",1,1,0,"sys_file_reference",129,,,,,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/localizeContent.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/localizeContent.csv
index cb47a10269f7..bc1dcb61ed3a 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/localizeContent.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/localizeContent.csv
@@ -37,3 +37,5 @@
 ,"96faaba988970bfcd00b334d8925b5ec","sys_file_reference",132,"uid_local",0,0,0,"sys_file",1,,,,,,,,,,,
 ,"7495604375ab4caae25ea3da5e76f6c3","pages",91,"l10n_parent",0,0,0,"pages",89,,,,,,,,,,,
 ,"885fa8b0049daa6a9f6989e7bc55ae11","pages",91,"sys_language_uid",0,0,0,"sys_language",1,,,,,,,,,,,
+,"7f0edf5e6a8704b7825f934cf264f3d6","tt_content",332,"image",0,0,0,"sys_file_reference",130,,,,,,,,,,,
+,"01ab20f517d1e81ea1ba24e62561c039","tt_content",332,"image",1,0,0,"sys_file_reference",132,,,,,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/modifyContentNAddFileReference.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/modifyContentNAddFileReference.csv
index dee5fb906e3b..8eff122708c2 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/modifyContentNAddFileReference.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/modifyContentNAddFileReference.csv
@@ -27,3 +27,4 @@
 ,"48540de7710e3082f347bdd65ca340f2","tt_content",331,"image",0,0,0,"sys_file_reference",128,,,,,,,,,,,
 ,"ceaebd2148901a6d7b0a52c546aa5218","tt_content",331,"image",1,0,0,"sys_file_reference",129,,,,,,,,,,,
 ,"96faaba988970bfcd00b334d8925b5ec","sys_file_reference",132,"uid_local",0,0,0,"sys_file",1,,,,,,,,,,,
+,"47b0249cf756eea3d76b532194ca4fe7","tt_content",331,"image",2,0,0,"sys_file_reference",132,,,,,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/modifyContentNDeleteAllFileReference.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/modifyContentNDeleteAllFileReference.csv
index d8d0378cfc99..f690519e9e09 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/modifyContentNDeleteAllFileReference.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/modifyContentNDeleteAllFileReference.csv
@@ -21,7 +21,5 @@
 ,"8e50f38980afa6f4e84530b12f9cd0b3","sys_file_reference",127,"uid_local",0,0,0,"sys_file",21,,,,,,,,,,,
 ,"a1f2ffdc6bf235cb5516c4bfdeec5552","tt_content",330,"image",0,0,0,"sys_file_reference",127,,,,,,,,,,,
 ,"fc208fc9d55a71b2faa9f4e4d4fa941d","tt_content",330,"image",1,0,0,"sys_file_reference",126,,,,,,,,,,,
-,"48540de7710e3082f347bdd65ca340f2","tt_content",331,"image",0,0,0,"sys_file_reference",128,,,,,,,,,,,
-,"ceaebd2148901a6d7b0a52c546aa5218","tt_content",331,"image",1,0,0,"sys_file_reference",129,,,,,,,,,,,
 ,"0b7edf2205371519698cdfbf6e0cc6e7","sys_file_reference",128,"uid_local",0,1,0,"sys_file",21,,,,,,,,,,,
 ,"fb266d0b94cee39b87fe03b9b7875c25","sys_file_reference",129,"uid_local",0,1,0,"sys_file",1,,,,,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/modifyContentNDeleteFileReference.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/modifyContentNDeleteFileReference.csv
index 2677c43ffaa7..4364ee242fb7 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/modifyContentNDeleteFileReference.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/modifyContentNDeleteFileReference.csv
@@ -22,6 +22,5 @@
 ,"c08c2538c324b0a98b0957bc4bdf36ae","sys_file_reference",129,"uid_local",0,0,0,"sys_file",1,,,,,,,,,,,
 ,"a1f2ffdc6bf235cb5516c4bfdeec5552","tt_content",330,"image",0,0,0,"sys_file_reference",127,,,,,,,,,,,
 ,"fc208fc9d55a71b2faa9f4e4d4fa941d","tt_content",330,"image",1,0,0,"sys_file_reference",126,,,,,,,,,,,
-,"48540de7710e3082f347bdd65ca340f2","tt_content",331,"image",0,0,0,"sys_file_reference",128,,,,,,,,,,,
-,"ceaebd2148901a6d7b0a52c546aa5218","tt_content",331,"image",1,0,0,"sys_file_reference",129,,,,,,,,,,,
 ,"0b7edf2205371519698cdfbf6e0cc6e7","sys_file_reference",128,"uid_local",0,1,0,"sys_file",21,,,,,,,,,,,
+,"997297edc2047a0fd48ffc237299a902","tt_content",331,"image",0,0,0,"sys_file_reference",129,,,,,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/copyPage.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/copyPage.csv
index bfbe41c508b0..f94abdd41a98 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/copyPage.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/copyPage.csv
@@ -73,8 +73,11 @@
 ,"a81c22270e0460f01945c76ff9207931","tx_irretutorial_1nff_hotel",12,"offers",0,0,0,"tx_irretutorial_1nff_offer",15,,,,,,,
 ,"79cc995658ae92af7fa70085b8758270","tx_irretutorial_1nff_offer",9,"prices",0,0,0,"tx_irretutorial_1nff_price",14,,,,,,,
 ,"0b1f257e028422a03a7754f9af22e894","tx_irretutorial_1nff_offer",11,"prices",0,0,0,"tx_irretutorial_1nff_price",16,,,,,,,
-,"8402a4706fc72aaba7ae0dd86b8f7f53","tx_irretutorial_1nff_offer",11,"prices",1,0,0,"tx_irretutorial_1nff_price",18,,,,,,,
-,"5c4375c00fcd2363bc7cf7d1a093f27e","tx_irretutorial_1nff_offer",11,"prices",2,0,0,"tx_irretutorial_1nff_price",20,,,,,,,
 ,"cfc667c438288caee77caad75380591b","tx_irretutorial_1nff_offer",13,"prices",0,0,0,"tx_irretutorial_1nff_price",22,,,,,,,
 ,"18225624114777c05225ef05b3ed32f9","tx_irretutorial_1nff_offer",13,"prices",1,0,0,"tx_irretutorial_1nff_price",24,,,,,,,
 ,"1b5ca5832c1661ba905a2bf64d7758b1","tx_irretutorial_1nff_offer",15,"prices",0,0,0,"tx_irretutorial_1nff_price",26,,,,,,,
+,"e874383078676dc2cace3dec5044ac9a","tt_content",299,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",8,,,,,,,
+,"903f12b77f445c154082309776cfa5c9","tt_content",301,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",10,,,,,,,
+,"b5b95da11c9bc72614338afdce9cfb3e","tt_content",301,"tx_irretutorial_1nff_hotels",1,0,0,"tx_irretutorial_1nff_hotel",12,,,,,,,
+,"9a591cdcec9912135cfba1b0d432ee1f","tx_irretutorial_1nff_offer",11,"prices",1,0,0,"tx_irretutorial_1nff_price",20,,,,,,,
+,"0c31bf16207245ea0e0a8ad9b0f65273","tx_irretutorial_1nff_offer",11,"prices",2,0,0,"tx_irretutorial_1nff_price",18,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/copyPageWHotelBeforeParentContent.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/copyPageWHotelBeforeParentContent.csv
index bac2a6acea25..f777cd577c53 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/copyPageWHotelBeforeParentContent.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/copyPageWHotelBeforeParentContent.csv
@@ -73,8 +73,11 @@
 ,"00519bbb0b49d6659f15572492d97132","tx_irretutorial_1nff_hotel",8,"offers",0,0,0,"tx_irretutorial_1nff_offer",9,,,,,,,
 ,"0b1f257e028422a03a7754f9af22e894","tx_irretutorial_1nff_offer",11,"prices",0,0,0,"tx_irretutorial_1nff_price",16,,,,,,,
 ,"2b9d7496969d1d01455315722ba8daac","tx_irretutorial_1nff_offer",13,"prices",0,0,0,"tx_irretutorial_1nff_price",18,,,,,,,
-,"57361914181e6bdf383ca411b02ff82b","tx_irretutorial_1nff_offer",13,"prices",1,0,0,"tx_irretutorial_1nff_price",20,,,,,,,
-,"cf276e94025d0621a37046de41d6c7ed","tx_irretutorial_1nff_offer",13,"prices",2,0,0,"tx_irretutorial_1nff_price",22,,,,,,,
 ,"8b1aacbf2a38ed68e1aaef67b0c70bef","tx_irretutorial_1nff_offer",15,"prices",0,0,0,"tx_irretutorial_1nff_price",24,,,,,,,
 ,"7864a13a901e3439d9bd65d4b0d0c812","tx_irretutorial_1nff_offer",15,"prices",1,0,0,"tx_irretutorial_1nff_price",26,,,,,,,
 ,"79cc995658ae92af7fa70085b8758270","tx_irretutorial_1nff_offer",9,"prices",0,0,0,"tx_irretutorial_1nff_price",14,,,,,,,
+,"8f1d0b2bd1c3a7464c926554655beec5","tt_content",299,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",10,,,,,,,
+,"2b8ac1823326a4e3202af99c46142e7b","tt_content",301,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",12,,,,,,,
+,"499aefae88e56643a6611e169ec2cd98","tt_content",301,"tx_irretutorial_1nff_hotels",1,0,0,"tx_irretutorial_1nff_hotel",8,,,,,,,
+,"6fb1c500f846553b3ff5b43d3bf6bd72","tx_irretutorial_1nff_offer",13,"prices",1,0,0,"tx_irretutorial_1nff_price",22,,,,,,,
+,"45ead33ad3a72cd30fdcf48119724108","tx_irretutorial_1nff_offer",13,"prices",2,0,0,"tx_irretutorial_1nff_price",20,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/copyParentContent.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/copyParentContent.csv
index 789ed31ae2f0..b1b7f2fba4f9 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/copyParentContent.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/copyParentContent.csv
@@ -46,6 +46,6 @@
 ,"d05558a22d87f923406b45cc3f369943","sys_workspace",1,"custom_stages",0,0,0,"sys_workspace_stage",1,,,,,,,
 ,"d445fd78a1e37837ce5cb8cfca3c3159","tt_content",297,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",3,,,,,,,
 ,"fcc697bfb91755f75e07f6ce1784b18b","tx_irretutorial_1nff_hotel",4,"offers",0,0,0,"tx_irretutorial_1nff_offer",7,,,,,,,
-# @todo: tt_content:299 -> hotel:6 missing
+,"8d75f94b9d17c650dc9bfa6a3f84e254","tt_content",299,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",6,,,,,,,
 ,"a0cfe1ce39be83687c92da2f4bd64df7","tx_irretutorial_1nff_hotel",6,"offers",0,0,0,"tx_irretutorial_1nff_offer",9,,,,,,,
 ,"79cc995658ae92af7fa70085b8758270","tx_irretutorial_1nff_offer",9,"prices",0,0,0,"tx_irretutorial_1nff_price",14,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/copyParentContentToDifferentPage.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/copyParentContentToDifferentPage.csv
index 1a71de9086ed..6ff95101e5a2 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/copyParentContentToDifferentPage.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/copyParentContentToDifferentPage.csv
@@ -54,3 +54,4 @@
 ,"fcc697bfb91755f75e07f6ce1784b18b","tx_irretutorial_1nff_hotel",4,"offers",0,0,0,"tx_irretutorial_1nff_offer",7,,,,,,,
 ,"a0cfe1ce39be83687c92da2f4bd64df7","tx_irretutorial_1nff_hotel",6,"offers",0,0,0,"tx_irretutorial_1nff_offer",9,,,,,,,
 ,"79cc995658ae92af7fa70085b8758270","tx_irretutorial_1nff_offer",9,"prices",0,0,0,"tx_irretutorial_1nff_price",14,,,,,,,
+,"8d75f94b9d17c650dc9bfa6a3f84e254","tt_content",299,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",6,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/createNCopyParentContentNHotelNOfferChildren.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/createNCopyParentContentNHotelNOfferChildren.csv
index 9fc64e944b16..70f4dd60aac7 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/createNCopyParentContentNHotelNOfferChildren.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/createNCopyParentContentNHotelNOfferChildren.csv
@@ -50,3 +50,5 @@
 ,"fcc697bfb91755f75e07f6ce1784b18b","tx_irretutorial_1nff_hotel",4,"offers",0,0,0,"tx_irretutorial_1nff_offer",7,,,,,,,
 ,"a0cfe1ce39be83687c92da2f4bd64df7","tx_irretutorial_1nff_hotel",6,"offers",0,0,0,"tx_irretutorial_1nff_offer",9,,,,,,,
 ,"e4c917a9b9d8a1ade11fb247f82e7b8c","tx_irretutorial_1nff_hotel",8,"offers",0,0,0,"tx_irretutorial_1nff_offer",11,,,,,,,
+,"8d75f94b9d17c650dc9bfa6a3f84e254","tt_content",299,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",6,,,,,,,
+,"bfec0ab61d725142ab9bcedd7c25a3c8","tt_content",301,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",8,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/createNLocalizeParentContentNHotelNOfferChildren.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/createNLocalizeParentContentNHotelNOfferChildren.csv
index a75fcb842546..30c949592341 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/createNLocalizeParentContentNHotelNOfferChildren.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/createNLocalizeParentContentNHotelNOfferChildren.csv
@@ -57,3 +57,5 @@
 ,"a94b6c0759ee650e37fff9bd515a2940","tx_irretutorial_1nff_offer",11,"sys_language_uid",0,0,0,"sys_language",1,,,,,,,
 ,"a9ee8ba875ba35f80ec82604488f21cd","tx_irretutorial_1nff_offer",11,"l18n_parent",0,0,0,"tx_irretutorial_1nff_offer",9,,,,,,,
 ,"e4c917a9b9d8a1ade11fb247f82e7b8c","tx_irretutorial_1nff_hotel",8,"offers",0,0,0,"tx_irretutorial_1nff_offer",11,,,,,,,
+,"8d75f94b9d17c650dc9bfa6a3f84e254","tt_content",299,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",6,,,,,,,
+,"bfec0ab61d725142ab9bcedd7c25a3c8","tt_content",301,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",8,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/createParentContentNHotelNOfferChildren.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/createParentContentNHotelNOfferChildren.csv
index 049c2d209080..a651b2a1f020 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/createParentContentNHotelNOfferChildren.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/createParentContentNHotelNOfferChildren.csv
@@ -46,3 +46,4 @@
 ,"d445fd78a1e37837ce5cb8cfca3c3159","tt_content",297,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",3,,,,,,,
 ,"fcc697bfb91755f75e07f6ce1784b18b","tx_irretutorial_1nff_hotel",4,"offers",0,0,0,"tx_irretutorial_1nff_offer",7,,,,,,,
 ,"a0cfe1ce39be83687c92da2f4bd64df7","tx_irretutorial_1nff_hotel",6,"offers",0,0,0,"tx_irretutorial_1nff_offer",9,,,,,,,
+,"8d75f94b9d17c650dc9bfa6a3f84e254","tt_content",299,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",6,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/deleteParentContent.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/deleteParentContent.csv
index 68c518643add..33e5b096a52f 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/deleteParentContent.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/deleteParentContent.csv
@@ -39,6 +39,3 @@
 ,"d05558a22d87f923406b45cc3f369943","sys_workspace",1,"custom_stages",0,0,0,"sys_workspace_stage",1,,,,,,,
 ,"d445fd78a1e37837ce5cb8cfca3c3159","tt_content",297,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",3,,,,,,,
 ,"fcc697bfb91755f75e07f6ce1784b18b","tx_irretutorial_1nff_hotel",4,"offers",0,0,0,"tx_irretutorial_1nff_offer",7,,,,,,,
-,"21bb2ff48321cd00af7ee156c889f2a9","tt_content",298,"tx_irretutorial_1nff_hotels",0,1,0,"tx_irretutorial_1nff_hotel",5,,,,,,,
-,"4800af08cdd411cbe57d5648abfc58b2","tx_irretutorial_1nff_hotel",5,"offers",0,1,0,"tx_irretutorial_1nff_offer",8,,,,,,,
-,"38a675380dc4214c554cfd01c6609078","tx_irretutorial_1nff_offer",8,"prices",0,1,0,"tx_irretutorial_1nff_price",13,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/localizeParentContentWAllChildren.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/localizeParentContentWAllChildren.csv
index df6a370cfb12..18204c48f1da 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/localizeParentContentWAllChildren.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/localizeParentContentWAllChildren.csv
@@ -57,3 +57,4 @@
 ,"cd7b32a4f3156c3004f525b832707a67","tx_irretutorial_1nff_price",14,"l18n_parent",0,0,0,"tx_irretutorial_1nff_price",13,,,,,,,
 ,"a0cfe1ce39be83687c92da2f4bd64df7","tx_irretutorial_1nff_hotel",6,"offers",0,0,0,"tx_irretutorial_1nff_offer",9,,,,,,,
 ,"79cc995658ae92af7fa70085b8758270","tx_irretutorial_1nff_offer",9,"prices",0,0,0,"tx_irretutorial_1nff_price",14,,,,,,,
+,"8d75f94b9d17c650dc9bfa6a3f84e254","tt_content",299,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",6,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/modifyParentNAddHotelChild.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/modifyParentNAddHotelChild.csv
index 30ede4a826c0..4f492382f8d1 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/modifyParentNAddHotelChild.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/modifyParentNAddHotelChild.csv
@@ -43,3 +43,4 @@
 ,"5f87b200c780cdaad0604f50da06ff64","tx_irretutorial_1nff_hotel",5,"offers",0,0,0,"tx_irretutorial_1nff_offer",8,,,,,,,
 ,"a94608071329f0b81c051da65b9c3e53","tx_irretutorial_1nff_offer",8,"prices",0,0,0,"tx_irretutorial_1nff_price",13,,,,,,,
 ,"43578810ac60f4e31c4c1eb52e37c4cb","tt_content",298,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",5,,,,,,,
+,"039a3027510a31d4182708b4c446d9d9","tt_content",298,"tx_irretutorial_1nff_hotels",1,0,0,"tx_irretutorial_1nff_hotel",7,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/modifyParentNChangeHotelChildrenSorting.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/modifyParentNChangeHotelChildrenSorting.csv
index bb0c3ba5b569..f3c960d0bdcf 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/modifyParentNChangeHotelChildrenSorting.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/modifyParentNChangeHotelChildrenSorting.csv
@@ -40,5 +40,5 @@
 ,"16a1e406f4a7130e58fb366e932e7508","tx_irretutorial_1nff_offer",5,"prices",2,0,0,"tx_irretutorial_1nff_price",9,,,,,,,
 ,"141f3d182dee9a325a853a0ff79602d9","tx_irretutorial_1nff_offer",6,"prices",0,0,0,"tx_irretutorial_1nff_price",10,,,,,,,
 ,"c6b8bf49d7d73a58a068814db5472e60","tx_irretutorial_1nff_offer",6,"prices",1,0,0,"tx_irretutorial_1nff_price",11,,,,,,,
-,"5925fc8c83fd2759d4dbb7d2e87b9e28","tt_content",297,"tx_irretutorial_1nff_hotels",1,0,0,"tx_irretutorial_1nff_hotel",4,,,,,,,
-,"d445fd78a1e37837ce5cb8cfca3c3159","tt_content",297,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",3,,,,,,,
+,"98e8b23fc53f85a72770efcab764e6ce","tt_content",297,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",4,,,,,,,
+,"df4a64b052f8f7c25226afe0ea6c9e6d","tt_content",297,"tx_irretutorial_1nff_hotels",1,0,0,"tx_irretutorial_1nff_hotel",3,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/modifyParentNDeleteHotelChild.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/modifyParentNDeleteHotelChild.csv
index b8ad3599235a..c54099284ed8 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/modifyParentNDeleteHotelChild.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/modifyParentNDeleteHotelChild.csv
@@ -40,7 +40,4 @@
 ,"c6b8bf49d7d73a58a068814db5472e60","tx_irretutorial_1nff_offer",6,"prices",1,0,0,"tx_irretutorial_1nff_price",11,,,,,,,
 ,"3a59a2c65f05196774ee38fad12b11a8","tx_irretutorial_1nff_hotel",3,"offers",1,0,0,"tx_irretutorial_1nff_offer",6,,,,,,,
 ,"991035e9a032ce5a95b3dbc7f2f31471","tx_irretutorial_1nff_hotel",3,"offers",0,0,0,"tx_irretutorial_1nff_offer",5,,,,,,,
-,"f7230ed016ca1a48f8193689dfd4bcb4","tx_irretutorial_1nff_hotel",4,"offers",0,1,0,"tx_irretutorial_1nff_offer",7,,,,,,,
-,"8867b6607a49f11bbf1ee1b3468d74e0","tx_irretutorial_1nff_offer",7,"prices",0,1,0,"tx_irretutorial_1nff_price",12,,,,,,,
-,"5925fc8c83fd2759d4dbb7d2e87b9e28","tt_content",297,"tx_irretutorial_1nff_hotels",1,0,0,"tx_irretutorial_1nff_hotel",4,,,,,,,
 ,"d445fd78a1e37837ce5cb8cfca3c3159","tt_content",297,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",3,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/moveParentContentToDifferentPageNChangeSorting.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/moveParentContentToDifferentPageNChangeSorting.csv
index a027247a8333..843787c34169 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/moveParentContentToDifferentPageNChangeSorting.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/moveParentContentToDifferentPageNChangeSorting.csv
@@ -32,13 +32,13 @@
 ,"5925fc8c83fd2759d4dbb7d2e87b9e28","tt_content",297,"tx_irretutorial_1nff_hotels",1,0,0,"tx_irretutorial_1nff_hotel",4,,,,,,,
 ,"d445fd78a1e37837ce5cb8cfca3c3159","tt_content",297,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",3,,,,,,,
 ,"5f87b200c780cdaad0604f50da06ff64","tx_irretutorial_1nff_hotel",5,"offers",0,0,0,"tx_irretutorial_1nff_offer",8,,,,,,,
-,"88f61684753ab6a32ff200164ae93198","tx_irretutorial_1nff_hotel",3,"offers",0,0,0,"tx_irretutorial_1nff_offer",6,,,,,,,
-,"6356312e1cdbbda5b2c9939d9860ed8f","tx_irretutorial_1nff_hotel",3,"offers",1,0,0,"tx_irretutorial_1nff_offer",5,,,,,,,
 ,"fcc697bfb91755f75e07f6ce1784b18b","tx_irretutorial_1nff_hotel",4,"offers",0,0,0,"tx_irretutorial_1nff_offer",7,,,,,,,
 ,"a94608071329f0b81c051da65b9c3e53","tx_irretutorial_1nff_offer",8,"prices",0,0,0,"tx_irretutorial_1nff_price",13,,,,,,,
-,"182d3359e7c8400e089bcd965bc75dc0","tx_irretutorial_1nff_offer",5,"prices",0,0,0,"tx_irretutorial_1nff_price",9,,,,,,,
 ,"6898a967adae0bddf17e30a04cf9c0ad","tx_irretutorial_1nff_offer",5,"prices",1,0,0,"tx_irretutorial_1nff_price",8,,,,,,,
-,"35ec0542fbbf3828231e76da6246a912","tx_irretutorial_1nff_offer",5,"prices",2,0,0,"tx_irretutorial_1nff_price",7,,,,,,,
-,"9e9d4b69b80392bfff30f3e15b2e6e66","tx_irretutorial_1nff_offer",6,"prices",0,0,0,"tx_irretutorial_1nff_price",11,,,,,,,
-,"e0de217e20de016e20c4cfa7531b1338","tx_irretutorial_1nff_offer",6,"prices",1,0,0,"tx_irretutorial_1nff_price",10,,,,,,,
 ,"bc4f857ec8124fdd793a76e7b45930af","tx_irretutorial_1nff_offer",7,"prices",0,0,0,"tx_irretutorial_1nff_price",12,,,,,,,
+,"991035e9a032ce5a95b3dbc7f2f31471","tx_irretutorial_1nff_hotel",3,"offers",0,0,0,"tx_irretutorial_1nff_offer",5,,,,,,,
+,"3a59a2c65f05196774ee38fad12b11a8","tx_irretutorial_1nff_hotel",3,"offers",1,0,0,"tx_irretutorial_1nff_offer",6,,,,,,,
+,"a5b1bb284498b3b68a87adda927e894f","tx_irretutorial_1nff_offer",5,"prices",0,0,0,"tx_irretutorial_1nff_price",7,,,,,,,
+,"16a1e406f4a7130e58fb366e932e7508","tx_irretutorial_1nff_offer",5,"prices",2,0,0,"tx_irretutorial_1nff_price",9,,,,,,,
+,"141f3d182dee9a325a853a0ff79602d9","tx_irretutorial_1nff_offer",6,"prices",0,0,0,"tx_irretutorial_1nff_price",10,,,,,,,
+,"c6b8bf49d7d73a58a068814db5472e60","tx_irretutorial_1nff_offer",6,"prices",1,0,0,"tx_irretutorial_1nff_price",11,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/copyPage.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/copyPage.csv
index 666efddc8ec3..980912ee9379 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/copyPage.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/copyPage.csv
@@ -72,9 +72,12 @@
 ,"a81c22270e0460f01945c76ff9207931","tx_irretutorial_1nff_hotel",12,"offers",0,0,0,"tx_irretutorial_1nff_offer",15,,,,,,,
 ,"00519bbb0b49d6659f15572492d97132","tx_irretutorial_1nff_hotel",8,"offers",0,0,0,"tx_irretutorial_1nff_offer",9,,,,,,,
 ,"0b1f257e028422a03a7754f9af22e894","tx_irretutorial_1nff_offer",11,"prices",0,0,0,"tx_irretutorial_1nff_price",16,,,,,,,
-,"8402a4706fc72aaba7ae0dd86b8f7f53","tx_irretutorial_1nff_offer",11,"prices",1,0,0,"tx_irretutorial_1nff_price",18,,,,,,,
-,"5c4375c00fcd2363bc7cf7d1a093f27e","tx_irretutorial_1nff_offer",11,"prices",2,0,0,"tx_irretutorial_1nff_price",20,,,,,,,
 ,"cfc667c438288caee77caad75380591b","tx_irretutorial_1nff_offer",13,"prices",0,0,0,"tx_irretutorial_1nff_price",22,,,,,,,
 ,"18225624114777c05225ef05b3ed32f9","tx_irretutorial_1nff_offer",13,"prices",1,0,0,"tx_irretutorial_1nff_price",24,,,,,,,
 ,"1b5ca5832c1661ba905a2bf64d7758b1","tx_irretutorial_1nff_offer",15,"prices",0,0,0,"tx_irretutorial_1nff_price",26,,,,,,,
 ,"79cc995658ae92af7fa70085b8758270","tx_irretutorial_1nff_offer",9,"prices",0,0,0,"tx_irretutorial_1nff_price",14,,,,,,,
+,"903f12b77f445c154082309776cfa5c9","tt_content",301,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",10,,,,,,,
+,"b5b95da11c9bc72614338afdce9cfb3e","tt_content",301,"tx_irretutorial_1nff_hotels",1,0,0,"tx_irretutorial_1nff_hotel",12,,,,,,,
+,"e874383078676dc2cace3dec5044ac9a","tt_content",299,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",8,,,,,,,
+,"9a591cdcec9912135cfba1b0d432ee1f","tx_irretutorial_1nff_offer",11,"prices",1,0,0,"tx_irretutorial_1nff_price",20,,,,,,,
+,"0c31bf16207245ea0e0a8ad9b0f65273","tx_irretutorial_1nff_offer",11,"prices",2,0,0,"tx_irretutorial_1nff_price",18,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/copyPageWHotelBeforeParentContent.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/copyPageWHotelBeforeParentContent.csv
index bac2a6acea25..f777cd577c53 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/copyPageWHotelBeforeParentContent.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/copyPageWHotelBeforeParentContent.csv
@@ -73,8 +73,11 @@
 ,"00519bbb0b49d6659f15572492d97132","tx_irretutorial_1nff_hotel",8,"offers",0,0,0,"tx_irretutorial_1nff_offer",9,,,,,,,
 ,"0b1f257e028422a03a7754f9af22e894","tx_irretutorial_1nff_offer",11,"prices",0,0,0,"tx_irretutorial_1nff_price",16,,,,,,,
 ,"2b9d7496969d1d01455315722ba8daac","tx_irretutorial_1nff_offer",13,"prices",0,0,0,"tx_irretutorial_1nff_price",18,,,,,,,
-,"57361914181e6bdf383ca411b02ff82b","tx_irretutorial_1nff_offer",13,"prices",1,0,0,"tx_irretutorial_1nff_price",20,,,,,,,
-,"cf276e94025d0621a37046de41d6c7ed","tx_irretutorial_1nff_offer",13,"prices",2,0,0,"tx_irretutorial_1nff_price",22,,,,,,,
 ,"8b1aacbf2a38ed68e1aaef67b0c70bef","tx_irretutorial_1nff_offer",15,"prices",0,0,0,"tx_irretutorial_1nff_price",24,,,,,,,
 ,"7864a13a901e3439d9bd65d4b0d0c812","tx_irretutorial_1nff_offer",15,"prices",1,0,0,"tx_irretutorial_1nff_price",26,,,,,,,
 ,"79cc995658ae92af7fa70085b8758270","tx_irretutorial_1nff_offer",9,"prices",0,0,0,"tx_irretutorial_1nff_price",14,,,,,,,
+,"8f1d0b2bd1c3a7464c926554655beec5","tt_content",299,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",10,,,,,,,
+,"2b8ac1823326a4e3202af99c46142e7b","tt_content",301,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",12,,,,,,,
+,"499aefae88e56643a6611e169ec2cd98","tt_content",301,"tx_irretutorial_1nff_hotels",1,0,0,"tx_irretutorial_1nff_hotel",8,,,,,,,
+,"6fb1c500f846553b3ff5b43d3bf6bd72","tx_irretutorial_1nff_offer",13,"prices",1,0,0,"tx_irretutorial_1nff_price",22,,,,,,,
+,"45ead33ad3a72cd30fdcf48119724108","tx_irretutorial_1nff_offer",13,"prices",2,0,0,"tx_irretutorial_1nff_price",20,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/copyParentContent.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/copyParentContent.csv
index adb6a52d0ce5..7858bd130c25 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/copyParentContent.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/copyParentContent.csv
@@ -48,3 +48,4 @@
 ,"fcc697bfb91755f75e07f6ce1784b18b","tx_irretutorial_1nff_hotel",4,"offers",0,0,0,"tx_irretutorial_1nff_offer",7,,,,,,,
 ,"a0cfe1ce39be83687c92da2f4bd64df7","tx_irretutorial_1nff_hotel",6,"offers",0,0,0,"tx_irretutorial_1nff_offer",9,,,,,,,
 ,"79cc995658ae92af7fa70085b8758270","tx_irretutorial_1nff_offer",9,"prices",0,0,0,"tx_irretutorial_1nff_price",14,,,,,,,
+,"8d75f94b9d17c650dc9bfa6a3f84e254","tt_content",299,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",6,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/copyParentContentToDifferentPage.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/copyParentContentToDifferentPage.csv
index 1a71de9086ed..6ff95101e5a2 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/copyParentContentToDifferentPage.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/copyParentContentToDifferentPage.csv
@@ -54,3 +54,4 @@
 ,"fcc697bfb91755f75e07f6ce1784b18b","tx_irretutorial_1nff_hotel",4,"offers",0,0,0,"tx_irretutorial_1nff_offer",7,,,,,,,
 ,"a0cfe1ce39be83687c92da2f4bd64df7","tx_irretutorial_1nff_hotel",6,"offers",0,0,0,"tx_irretutorial_1nff_offer",9,,,,,,,
 ,"79cc995658ae92af7fa70085b8758270","tx_irretutorial_1nff_offer",9,"prices",0,0,0,"tx_irretutorial_1nff_price",14,,,,,,,
+,"8d75f94b9d17c650dc9bfa6a3f84e254","tt_content",299,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",6,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/createNCopyParentContentNHotelNOfferChildren.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/createNCopyParentContentNHotelNOfferChildren.csv
index c4192b4bcd31..35ce4f883f92 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/createNCopyParentContentNHotelNOfferChildren.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/createNCopyParentContentNHotelNOfferChildren.csv
@@ -50,3 +50,5 @@
 ,"fcc697bfb91755f75e07f6ce1784b18b","tx_irretutorial_1nff_hotel",4,"offers",0,0,0,"tx_irretutorial_1nff_offer",7,,,,,,,
 ,"e4c917a9b9d8a1ade11fb247f82e7b8c","tx_irretutorial_1nff_hotel",8,"offers",0,0,0,"tx_irretutorial_1nff_offer",11,,,,,,,
 ,"a0cfe1ce39be83687c92da2f4bd64df7","tx_irretutorial_1nff_hotel",6,"offers",0,0,0,"tx_irretutorial_1nff_offer",9,,,,,,,
+,"bfec0ab61d725142ab9bcedd7c25a3c8","tt_content",301,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",8,,,,,,,
+,"8d75f94b9d17c650dc9bfa6a3f84e254","tt_content",299,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",6,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/createNLocalizeParentContentNHotelNOfferChildren.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/createNLocalizeParentContentNHotelNOfferChildren.csv
index 1db92a0c4f2b..b172b7cdd6a8 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/createNLocalizeParentContentNHotelNOfferChildren.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/createNLocalizeParentContentNHotelNOfferChildren.csv
@@ -57,3 +57,5 @@
 ,"885fa8b0049daa6a9f6989e7bc55ae11","pages",91,"sys_language_uid",0,0,0,"sys_language",1,,,,,,,
 ,"e4c917a9b9d8a1ade11fb247f82e7b8c","tx_irretutorial_1nff_hotel",8,"offers",0,0,0,"tx_irretutorial_1nff_offer",11,,,,,,,
 ,"a0cfe1ce39be83687c92da2f4bd64df7","tx_irretutorial_1nff_hotel",6,"offers",0,0,0,"tx_irretutorial_1nff_offer",9,,,,,,,
+,"bfec0ab61d725142ab9bcedd7c25a3c8","tt_content",301,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",8,,,,,,,
+,"8d75f94b9d17c650dc9bfa6a3f84e254","tt_content",299,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",6,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/createParentContentNHotelNOfferChildren.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/createParentContentNHotelNOfferChildren.csv
index 049c2d209080..a651b2a1f020 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/createParentContentNHotelNOfferChildren.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/createParentContentNHotelNOfferChildren.csv
@@ -46,3 +46,4 @@
 ,"d445fd78a1e37837ce5cb8cfca3c3159","tt_content",297,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",3,,,,,,,
 ,"fcc697bfb91755f75e07f6ce1784b18b","tx_irretutorial_1nff_hotel",4,"offers",0,0,0,"tx_irretutorial_1nff_offer",7,,,,,,,
 ,"a0cfe1ce39be83687c92da2f4bd64df7","tx_irretutorial_1nff_hotel",6,"offers",0,0,0,"tx_irretutorial_1nff_offer",9,,,,,,,
+,"8d75f94b9d17c650dc9bfa6a3f84e254","tt_content",299,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",6,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/deleteParentContent.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/deleteParentContent.csv
index 68c518643add..33e5b096a52f 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/deleteParentContent.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/deleteParentContent.csv
@@ -39,6 +39,3 @@
 ,"d05558a22d87f923406b45cc3f369943","sys_workspace",1,"custom_stages",0,0,0,"sys_workspace_stage",1,,,,,,,
 ,"d445fd78a1e37837ce5cb8cfca3c3159","tt_content",297,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",3,,,,,,,
 ,"fcc697bfb91755f75e07f6ce1784b18b","tx_irretutorial_1nff_hotel",4,"offers",0,0,0,"tx_irretutorial_1nff_offer",7,,,,,,,
-,"21bb2ff48321cd00af7ee156c889f2a9","tt_content",298,"tx_irretutorial_1nff_hotels",0,1,0,"tx_irretutorial_1nff_hotel",5,,,,,,,
-,"4800af08cdd411cbe57d5648abfc58b2","tx_irretutorial_1nff_hotel",5,"offers",0,1,0,"tx_irretutorial_1nff_offer",8,,,,,,,
-,"38a675380dc4214c554cfd01c6609078","tx_irretutorial_1nff_offer",8,"prices",0,1,0,"tx_irretutorial_1nff_price",13,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/localizeParentContentWAllChildren.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/localizeParentContentWAllChildren.csv
index e4e718028e55..bfa3d39aa20e 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/localizeParentContentWAllChildren.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/localizeParentContentWAllChildren.csv
@@ -57,3 +57,4 @@
 ,"885fa8b0049daa6a9f6989e7bc55ae11","pages",91,"sys_language_uid",0,0,0,"sys_language",1,,,,,,,
 ,"a0cfe1ce39be83687c92da2f4bd64df7","tx_irretutorial_1nff_hotel",6,"offers",0,0,0,"tx_irretutorial_1nff_offer",9,,,,,,,
 ,"79cc995658ae92af7fa70085b8758270","tx_irretutorial_1nff_offer",9,"prices",0,0,0,"tx_irretutorial_1nff_price",14,,,,,,,
+,"8d75f94b9d17c650dc9bfa6a3f84e254","tt_content",299,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",6,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/modifyParentNAddHotelChild.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/modifyParentNAddHotelChild.csv
index 30ede4a826c0..4f492382f8d1 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/modifyParentNAddHotelChild.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/modifyParentNAddHotelChild.csv
@@ -43,3 +43,4 @@
 ,"5f87b200c780cdaad0604f50da06ff64","tx_irretutorial_1nff_hotel",5,"offers",0,0,0,"tx_irretutorial_1nff_offer",8,,,,,,,
 ,"a94608071329f0b81c051da65b9c3e53","tx_irretutorial_1nff_offer",8,"prices",0,0,0,"tx_irretutorial_1nff_price",13,,,,,,,
 ,"43578810ac60f4e31c4c1eb52e37c4cb","tt_content",298,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",5,,,,,,,
+,"039a3027510a31d4182708b4c446d9d9","tt_content",298,"tx_irretutorial_1nff_hotels",1,0,0,"tx_irretutorial_1nff_hotel",7,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/modifyParentNChangeHotelChildrenSorting.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/modifyParentNChangeHotelChildrenSorting.csv
index bb0c3ba5b569..f3c960d0bdcf 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/modifyParentNChangeHotelChildrenSorting.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/modifyParentNChangeHotelChildrenSorting.csv
@@ -40,5 +40,5 @@
 ,"16a1e406f4a7130e58fb366e932e7508","tx_irretutorial_1nff_offer",5,"prices",2,0,0,"tx_irretutorial_1nff_price",9,,,,,,,
 ,"141f3d182dee9a325a853a0ff79602d9","tx_irretutorial_1nff_offer",6,"prices",0,0,0,"tx_irretutorial_1nff_price",10,,,,,,,
 ,"c6b8bf49d7d73a58a068814db5472e60","tx_irretutorial_1nff_offer",6,"prices",1,0,0,"tx_irretutorial_1nff_price",11,,,,,,,
-,"5925fc8c83fd2759d4dbb7d2e87b9e28","tt_content",297,"tx_irretutorial_1nff_hotels",1,0,0,"tx_irretutorial_1nff_hotel",4,,,,,,,
-,"d445fd78a1e37837ce5cb8cfca3c3159","tt_content",297,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",3,,,,,,,
+,"98e8b23fc53f85a72770efcab764e6ce","tt_content",297,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",4,,,,,,,
+,"df4a64b052f8f7c25226afe0ea6c9e6d","tt_content",297,"tx_irretutorial_1nff_hotels",1,0,0,"tx_irretutorial_1nff_hotel",3,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/modifyParentNDeleteHotelChild.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/modifyParentNDeleteHotelChild.csv
index 8a5e871f880e..6895d3b28014 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/modifyParentNDeleteHotelChild.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/modifyParentNDeleteHotelChild.csv
@@ -39,5 +39,3 @@
 ,"c6b8bf49d7d73a58a068814db5472e60","tx_irretutorial_1nff_offer",6,"prices",1,0,0,"tx_irretutorial_1nff_price",11,,,,,,,
 ,"3a59a2c65f05196774ee38fad12b11a8","tx_irretutorial_1nff_hotel",3,"offers",1,0,0,"tx_irretutorial_1nff_offer",6,,,,,,,
 ,"991035e9a032ce5a95b3dbc7f2f31471","tx_irretutorial_1nff_hotel",3,"offers",0,0,0,"tx_irretutorial_1nff_offer",5,,,,,,,
-,"f7230ed016ca1a48f8193689dfd4bcb4","tx_irretutorial_1nff_hotel",4,"offers",0,1,0,"tx_irretutorial_1nff_offer",7,,,,,,,
-,"8867b6607a49f11bbf1ee1b3468d74e0","tx_irretutorial_1nff_offer",7,"prices",0,1,0,"tx_irretutorial_1nff_price",12,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/moveParentContentToDifferentPageNChangeSorting.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/moveParentContentToDifferentPageNChangeSorting.csv
index f8bad08dc298..fa4a5fdb3990 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/moveParentContentToDifferentPageNChangeSorting.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/moveParentContentToDifferentPageNChangeSorting.csv
@@ -28,17 +28,17 @@
 ,"1bbbf7d18b85fd6e70d76947a563e492","sys_workspace_stage",1,"responsible_persons",0,0,0,"be_users",3,,,,,,,
 ,"2dfd3b8e87b9b45f18e0b3c3a7fa2f72","pages",89,"tx_irretutorial_hotels",0,0,0,"tx_irretutorial_1nff_hotel",2,,,,,,,
 ,"d05558a22d87f923406b45cc3f369943","sys_workspace",1,"custom_stages",0,0,0,"sys_workspace_stage",1,,,,,,,
-,"88f61684753ab6a32ff200164ae93198","tx_irretutorial_1nff_hotel",3,"offers",0,0,0,"tx_irretutorial_1nff_offer",6,,,,,,,
-,"6356312e1cdbbda5b2c9939d9860ed8f","tx_irretutorial_1nff_hotel",3,"offers",1,0,0,"tx_irretutorial_1nff_offer",5,,,,,,,
 ,"fcc697bfb91755f75e07f6ce1784b18b","tx_irretutorial_1nff_hotel",4,"offers",0,0,0,"tx_irretutorial_1nff_offer",7,,,,,,,
 ,"5f87b200c780cdaad0604f50da06ff64","tx_irretutorial_1nff_hotel",5,"offers",0,0,0,"tx_irretutorial_1nff_offer",8,,,,,,,
-,"182d3359e7c8400e089bcd965bc75dc0","tx_irretutorial_1nff_offer",5,"prices",0,0,0,"tx_irretutorial_1nff_price",9,,,,,,,
-,"6898a967adae0bddf17e30a04cf9c0ad","tx_irretutorial_1nff_offer",5,"prices",1,0,0,"tx_irretutorial_1nff_price",8,,,,,,,
-,"35ec0542fbbf3828231e76da6246a912","tx_irretutorial_1nff_offer",5,"prices",2,0,0,"tx_irretutorial_1nff_price",7,,,,,,,
-,"9e9d4b69b80392bfff30f3e15b2e6e66","tx_irretutorial_1nff_offer",6,"prices",0,0,0,"tx_irretutorial_1nff_price",11,,,,,,,
-,"e0de217e20de016e20c4cfa7531b1338","tx_irretutorial_1nff_offer",6,"prices",1,0,0,"tx_irretutorial_1nff_price",10,,,,,,,
 ,"bc4f857ec8124fdd793a76e7b45930af","tx_irretutorial_1nff_offer",7,"prices",0,0,0,"tx_irretutorial_1nff_price",12,,,,,,,
 ,"a94608071329f0b81c051da65b9c3e53","tx_irretutorial_1nff_offer",8,"prices",0,0,0,"tx_irretutorial_1nff_price",13,,,,,,,
 ,"43578810ac60f4e31c4c1eb52e37c4cb","tt_content",298,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",5,,,,,,,
 ,"5925fc8c83fd2759d4dbb7d2e87b9e28","tt_content",297,"tx_irretutorial_1nff_hotels",1,0,0,"tx_irretutorial_1nff_hotel",4,,,,,,,
 ,"d445fd78a1e37837ce5cb8cfca3c3159","tt_content",297,"tx_irretutorial_1nff_hotels",0,0,0,"tx_irretutorial_1nff_hotel",3,,,,,,,
+,"991035e9a032ce5a95b3dbc7f2f31471","tx_irretutorial_1nff_hotel",3,"offers",0,0,0,"tx_irretutorial_1nff_offer",5,,,,,,,
+,"3a59a2c65f05196774ee38fad12b11a8","tx_irretutorial_1nff_hotel",3,"offers",1,0,0,"tx_irretutorial_1nff_offer",6,,,,,,,
+,"a5b1bb284498b3b68a87adda927e894f","tx_irretutorial_1nff_offer",5,"prices",0,0,0,"tx_irretutorial_1nff_price",7,,,,,,,
+,"16a1e406f4a7130e58fb366e932e7508","tx_irretutorial_1nff_offer",5,"prices",2,0,0,"tx_irretutorial_1nff_price",9,,,,,,,
+,"141f3d182dee9a325a853a0ff79602d9","tx_irretutorial_1nff_offer",6,"prices",0,0,0,"tx_irretutorial_1nff_price",10,,,,,,,
+,"c6b8bf49d7d73a58a068814db5472e60","tx_irretutorial_1nff_offer",6,"prices",1,0,0,"tx_irretutorial_1nff_price",11,,,,,,,
+,"6898a967adae0bddf17e30a04cf9c0ad","tx_irretutorial_1nff_offer",5,"prices",1,0,0,"tx_irretutorial_1nff_price",8,,,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Publish/DataSet/createContentNCreateRelation.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Publish/DataSet/createContentNCreateRelation.csv
index b8db83be97f8..6699bbc386b2 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Publish/DataSet/createContentNCreateRelation.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Publish/DataSet/createContentNCreateRelation.csv
@@ -26,4 +26,4 @@
 ,"aabda97b66f9b693f30d1faf442b37d6","sys_category",29,"items",1,0,0,"tt_content",298,,,,,
 ,"b102e2f9b1ed99b14d813363199cb281","sys_category",30,"items",0,0,0,"tt_content",298,,,,,
 ,"1b70a8e25c22645f7a49a79f57f3cf3f","sys_category",31,"parent",0,0,0,"sys_category",28,,,,,
-,"7dbec83366f1752942f4cc5adaebf64c","sys_category",32,"items",0,0,0,"tt_content",300,,,,,
+,"4c95eb2abf33739ef508c06e86605193","sys_category",32,"items",0,0,0,"tt_content",299,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Publish/DataSet/createContentWCategoryNAddRelation.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Publish/DataSet/createContentWCategoryNAddRelation.csv
index b8db83be97f8..6699bbc386b2 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Publish/DataSet/createContentWCategoryNAddRelation.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Publish/DataSet/createContentWCategoryNAddRelation.csv
@@ -26,4 +26,4 @@
 ,"aabda97b66f9b693f30d1faf442b37d6","sys_category",29,"items",1,0,0,"tt_content",298,,,,,
 ,"b102e2f9b1ed99b14d813363199cb281","sys_category",30,"items",0,0,0,"tt_content",298,,,,,
 ,"1b70a8e25c22645f7a49a79f57f3cf3f","sys_category",31,"parent",0,0,0,"sys_category",28,,,,,
-,"7dbec83366f1752942f4cc5adaebf64c","sys_category",32,"items",0,0,0,"tt_content",300,,,,,
+,"4c95eb2abf33739ef508c06e86605193","sys_category",32,"items",0,0,0,"tt_content",299,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/createCategoryNCreateRelation.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/createCategoryNCreateRelation.csv
index 0892e821a741..87376155ed4c 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/createCategoryNCreateRelation.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/createCategoryNCreateRelation.csv
@@ -26,4 +26,4 @@
 ,"aabda97b66f9b693f30d1faf442b37d6","sys_category",29,"items",1,0,0,"tt_content",298,,,,,
 ,"b102e2f9b1ed99b14d813363199cb281","sys_category",30,"items",0,0,0,"tt_content",298,,,,,
 ,"1b70a8e25c22645f7a49a79f57f3cf3f","sys_category",31,"parent",0,0,0,"sys_category",28,,,,,
-,"7dbec83366f1752942f4cc5adaebf64c","sys_category",32,"items",0,0,0,"tt_content",300,,,,,
+,"4c95eb2abf33739ef508c06e86605193","sys_category",32,"items",0,0,0,"tt_content",299,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/createCategoryWContentNAddRelation.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/createCategoryWContentNAddRelation.csv
index 0892e821a741..87376155ed4c 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/createCategoryWContentNAddRelation.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/createCategoryWContentNAddRelation.csv
@@ -26,4 +26,4 @@
 ,"aabda97b66f9b693f30d1faf442b37d6","sys_category",29,"items",1,0,0,"tt_content",298,,,,,
 ,"b102e2f9b1ed99b14d813363199cb281","sys_category",30,"items",0,0,0,"tt_content",298,,,,,
 ,"1b70a8e25c22645f7a49a79f57f3cf3f","sys_category",31,"parent",0,0,0,"sys_category",28,,,,,
-,"7dbec83366f1752942f4cc5adaebf64c","sys_category",32,"items",0,0,0,"tt_content",300,,,,,
+,"4c95eb2abf33739ef508c06e86605193","sys_category",32,"items",0,0,0,"tt_content",299,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/createContentNCreateRelation.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/createContentNCreateRelation.csv
index b8db83be97f8..6699bbc386b2 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/createContentNCreateRelation.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/createContentNCreateRelation.csv
@@ -26,4 +26,4 @@
 ,"aabda97b66f9b693f30d1faf442b37d6","sys_category",29,"items",1,0,0,"tt_content",298,,,,,
 ,"b102e2f9b1ed99b14d813363199cb281","sys_category",30,"items",0,0,0,"tt_content",298,,,,,
 ,"1b70a8e25c22645f7a49a79f57f3cf3f","sys_category",31,"parent",0,0,0,"sys_category",28,,,,,
-,"7dbec83366f1752942f4cc5adaebf64c","sys_category",32,"items",0,0,0,"tt_content",300,,,,,
+,"4c95eb2abf33739ef508c06e86605193","sys_category",32,"items",0,0,0,"tt_content",299,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/createContentWCategoryNAddRelation.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/createContentWCategoryNAddRelation.csv
index b8db83be97f8..6699bbc386b2 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/createContentWCategoryNAddRelation.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/createContentWCategoryNAddRelation.csv
@@ -26,4 +26,4 @@
 ,"aabda97b66f9b693f30d1faf442b37d6","sys_category",29,"items",1,0,0,"tt_content",298,,,,,
 ,"b102e2f9b1ed99b14d813363199cb281","sys_category",30,"items",0,0,0,"tt_content",298,,,,,
 ,"1b70a8e25c22645f7a49a79f57f3cf3f","sys_category",31,"parent",0,0,0,"sys_category",28,,,,,
-,"7dbec83366f1752942f4cc5adaebf64c","sys_category",32,"items",0,0,0,"tt_content",300,,,,,
+,"4c95eb2abf33739ef508c06e86605193","sys_category",32,"items",0,0,0,"tt_content",299,,,,,
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/modifyBothsOfRelation.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/modifyBothsOfRelation.csv
index e3cbf9adf076..83368f400110 100644
--- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/modifyBothsOfRelation.csv
+++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/modifyBothsOfRelation.csv
@@ -24,4 +24,4 @@
 ,"aabda97b66f9b693f30d1faf442b37d6","sys_category",29,"items",1,0,0,"tt_content",298,,,,,
 ,"b102e2f9b1ed99b14d813363199cb281","sys_category",30,"items",0,0,0,"tt_content",298,,,,,
 ,"1b70a8e25c22645f7a49a79f57f3cf3f","sys_category",31,"parent",0,0,0,"sys_category",28,,,,,
-,"6848919a0f5c9f440c5abb9ee00b9d3a","sys_category",28,"items",0,0,0,"tt_content",299,,,,,
+,"58b0861c2821b9aa8c036f51c9992938","sys_category",28,"items",0,0,0,"tt_content",297,,,,,
-- 
GitLab