[BUGFIX] Ignore placeholders when copying records 71/45071/4
authorOliver Hader <oliver@typo3.org>
Sat, 31 Oct 2015 19:46:46 +0000 (20:46 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Fri, 4 Dec 2015 17:16:19 +0000 (18:16 +0100)
Copying records would make placeholders for draft elements visible in the
copy. This is due to the fact that t3ver_state information is removed upon
copy and the records itself are not ignored either. To circumvent that, now
only relevant records are selected for each scope, being live workspace or
any draft workspace. This also means, that new placeholders are copied if
the process has been initiated on a real draft workspace, which does not
happen if the duplication process was triggered in the live workspace.

Resolves: #36946
Resolves: #42075
Releases: master, 6.2
Change-Id: I0952d1a46d1cc02e0ec97f7cbbc9abc700e00c07
Reviewed-on: https://review.typo3.org/45071
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
13 files changed:
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/copyPageWHotelBeforeParentContent.csv
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/copyPageWHotelBeforeParentContent.csv
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/copyPageWHotelBeforeParentContent.csv
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/DataSet/changeContentSortingAndCopyDraftPage.csv
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/DataSet/changeContentSortingAndCopyLivePage.csv
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/DataSet/createContentAndCopyLivePage.csv
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/DataSet/createNestedPagesAndCopyLiveParentPage.csv
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/DataSet/createPageAndCopyLiveParentPage.csv
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/DataSet/deleteContentAndCopyDraftPage.csv
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/DataSet/moveContentAndCopyDraftPage.csv
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/DataSet/moveContentAndCopyLivePage.csv

index 8beb112..b81ded1 100644 (file)
@@ -3285,15 +3285,35 @@ class DataHandler {
                                                $transOrigPointerField = $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'];
                                                $fields .= ',' . $languageField . ',' . $transOrigPointerField;
                                        }
+                                       if (!BackendUtility::isTableWorkspaceEnabled($table)) {
+                                               $workspaceStatement = '';
+                                       } elseif ((int)$this->BE_USER->workspace === 0) {
+                                               $workspaceStatement = ' AND t3ver_wsid=0';
+                                       } else {
+                                               $workspaceStatement = ' AND t3ver_wsid IN (0,' . (int)$this->BE_USER->workspace . ')';
+                                       }
                                        $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
                                                $fields,
                                                $table,
-                                               'pid=' . (int)$uid . $this->deleteClause($table),
+                                               'pid=' . (int)$uid . $this->deleteClause($table) . $workspaceStatement,
                                                '',
                                                (!empty($GLOBALS['TCA'][$table]['ctrl']['sortby']) ? $GLOBALS['TCA'][$table]['ctrl']['sortby'] . ' DESC' : ''),
                                                '',
                                                'uid'
                                        );
+                                       // Resolve placeholders of workspace versions
+                                       if (!empty($rows) && (int)$this->BE_USER->workspace !== 0 && BackendUtility::isTableWorkspaceEnabled($table)) {
+                                               $rows = array_reverse(
+                                                       $this->resolveVersionedRecords(
+                                                               $table,
+                                                               $fields,
+                                                               $GLOBALS['TCA'][$table]['ctrl']['sortby'],
+                                                               array_keys($rows)
+                                                       ),
+                                                       TRUE
+                                               );
+                                       }
+
                                        foreach ($rows as $row) {
                                                // Skip localized records that will be processed in
                                                // copyL10nOverlayRecords() on copying the default language record
@@ -6770,18 +6790,44 @@ class DataHandler {
         */
        public function int_pageTreeInfo($CPtable, $pid, $counter, $rootID) {
                if ($counter) {
+                       if ((int)$this->BE_USER->workspace === 0) {
+                               $workspaceStatement = ' AND t3ver_wsid=0';
+                       } else {
+                               $workspaceStatement = ' AND t3ver_wsid IN (0,' . (int)$this->BE_USER->workspace . ')';
+                       }
                        $addW = !$this->admin ? ' AND ' . $this->BE_USER->getPagePermsClause($this->pMap['show']) : '';
-                       $mres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'pages', 'pid=' . (int)$pid . $this->deleteClause('pages') . $addW, '', 'sorting DESC');
-                       while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($mres)) {
-                               if ($row['uid'] != $rootID) {
-                                       $CPtable[$row['uid']] = $pid;
+                       $pages = $this->databaseConnection->exec_SELECTgetRows(
+                               'uid',
+                               'pages',
+                               'pid=' . (int)$pid . $this->deleteClause('pages') . $workspaceStatement . $addW,
+                               '',
+                               'sorting DESC',
+                               '',
+                               'uid'
+                       );
+
+                       // Resolve placeholders of workspace versions
+                       if (!empty($pages) && (int)$this->BE_USER->workspace !== 0) {
+                               $pages = array_reverse(
+                                       $this->resolveVersionedRecords(
+                                               'pages',
+                                               'uid',
+                                               'sorting',
+                                               array_keys($pages)
+                                       ),
+                                       TRUE
+                               );
+                       }
+
+                       foreach ($pages as $page) {
+                               if ($page['uid'] != $rootID) {
+                                       $CPtable[$page['uid']] = $pid;
                                        // If the uid is NOT the rootID of the copyaction and if we are supposed to walk further down
                                        if ($counter - 1) {
-                                               $CPtable = $this->int_pageTreeInfo($CPtable, $row['uid'], $counter - 1, $rootID);
+                                               $CPtable = $this->int_pageTreeInfo($CPtable, $page['uid'], $counter - 1, $rootID);
                                        }
                                }
                        }
-                       $GLOBALS['TYPO3_DB']->sql_free_result($mres);
                }
                return $CPtable;
        }
@@ -7546,6 +7592,39 @@ class DataHandler {
        }
 
        /**
+        * Resolves versioned records for the current workspace scope.
+        * Delete placeholders and move placeholders are substituted and removed.
+        *
+        * @param string $tableName Name of the table to be processed
+        * @param string $fieldNames List of the field names to be fetched
+        * @param string $sortingField Name of the sorting field to be used
+        * @param array $liveIds Flat array of (live) record ids
+        * @return array
+        */
+       protected function resolveVersionedRecords($tableName, $fieldNames, $sortingField, array $liveIds) {
+               /** @var PlainDataResolver $resolver */
+               $resolver = GeneralUtility::makeInstance(
+                       'TYPO3\\CMS\\Core\\DataHandling\\PlainDataResolver',
+                       $tableName,
+                       $liveIds,
+                       $sortingField
+               );
+
+               $resolver->setWorkspaceId($this->BE_USER->workspace);
+               $resolver->setKeepDeletePlaceholder(FALSE);
+               $resolver->setKeepMovePlaceholder(FALSE);
+               $resolver->setKeepLiveIds(TRUE);
+               $recordIds = $resolver->get();
+
+               $records = array();
+               foreach ($recordIds as $recordId) {
+                       $records[$recordId] = BackendUtility::getRecord($tableName, $recordId, $fieldNames);
+               }
+
+               return $records;
+       }
+
+       /**
         * Gets the outer most instance of \TYPO3\CMS\Core\DataHandling\DataHandler
         * Since \TYPO3\CMS\Core\DataHandling\DataHandler can create nested objects of itself,
         * this method helps to determine the first (= outer most) one.
index 97a54ca..1e9b80c 100644 (file)
@@ -21,10 +21,10 @@ tx_irretutorial_1nff_hotel
 ,5,89,1,0,0,0,0,0,0,0,0,"Hotel #1",298,tt_content,,1
 ,6,91,2,0,0,0,1,1,0,0,0,"Hotel #2",301,tt_content,,0
 ,7,-1,256,0,0,0,1,-1,0,6,0,"Hotel #2",301,tt_content,,1
-,8,91,1,0,0,0,1,1,0,0,0,"Hotel #1",301,tt_content,,0
-,9,-1,128,0,0,0,1,-1,0,8,0,"Hotel #1",301,tt_content,,2
-,10,91,1,0,0,0,1,1,0,0,0,"Hotel #1",299,tt_content,,0
-,11,-1,64,0,0,0,1,-1,0,10,0,"Hotel #1",299,tt_content,,1
+,8,91,1,0,0,0,1,1,0,0,0,"Hotel #1",299,tt_content,,0
+,9,-1,128,0,0,0,1,-1,0,8,0,"Hotel #1",299,tt_content,,1
+,10,91,1,0,0,0,1,1,0,0,0,"Hotel #1",301,tt_content,,0
+,11,-1,64,0,0,0,1,-1,0,10,0,"Hotel #1",301,tt_content,,2
 tx_irretutorial_1nff_offer
 ,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,prices
 ,5,89,1,0,0,0,0,0,0,0,0,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
@@ -33,12 +33,12 @@ tx_irretutorial_1nff_offer
 ,8,89,1,0,0,0,0,0,0,0,0,"Offer #1.1",5,tx_irretutorial_1nff_hotel,,1
 ,9,91,768,0,0,0,1,1,0,0,0,"Offer #2.1",6,tx_irretutorial_1nff_hotel,,0
 ,10,-1,256,0,0,0,1,-1,0,9,0,"Offer #2.1",6,tx_irretutorial_1nff_hotel,,1
-,11,91,1,0,0,0,1,1,0,0,0,"Offer #1.1",8,tx_irretutorial_1nff_hotel,,0
-,12,-1,0,0,0,0,1,-1,0,11,0,"Offer #1.1",8,tx_irretutorial_1nff_hotel,,3
-,13,91,2,0,0,0,1,1,0,0,0,"Offer #1.2",8,tx_irretutorial_1nff_hotel,,0
-,14,-1,256,0,0,0,1,-1,0,13,0,"Offer #1.2",8,tx_irretutorial_1nff_hotel,,2
-,15,91,1,0,0,0,1,1,0,0,0,"Offer #1.1",10,tx_irretutorial_1nff_hotel,,0
-,16,-1,0,0,0,0,1,-1,0,15,0,"Offer #1.1",10,tx_irretutorial_1nff_hotel,,1
+,11,91,1024,0,0,0,1,1,0,0,0,"Offer #1.1",8,tx_irretutorial_1nff_hotel,,0
+,12,-1,0,0,0,0,1,-1,0,11,0,"Offer #1.1",8,tx_irretutorial_1nff_hotel,,1
+,13,91,1,0,0,0,1,1,0,0,0,"Offer #1.1",10,tx_irretutorial_1nff_hotel,,0
+,14,-1,0,0,0,0,1,-1,0,13,0,"Offer #1.1",10,tx_irretutorial_1nff_hotel,,3
+,15,91,2,0,0,0,1,1,0,0,0,"Offer #1.2",10,tx_irretutorial_1nff_hotel,,0
+,16,-1,256,0,0,0,1,-1,0,15,0,"Offer #1.2",10,tx_irretutorial_1nff_hotel,,2
 tx_irretutorial_1nff_price
 ,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier
 ,7,89,1,0,0,0,0,0,0,0,0,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
@@ -50,15 +50,15 @@ tx_irretutorial_1nff_price
 ,13,89,1,0,0,0,0,0,0,0,0,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
 ,14,91,1536,0,0,0,1,1,0,0,0,"Price #2.1.1",9,tx_irretutorial_1nff_offer,
 ,15,-1,256,0,0,0,1,-1,0,14,0,"Price #2.1.1",9,tx_irretutorial_1nff_offer,
-,16,91,768,0,0,0,1,1,0,0,0,"Price #1.1.1",11,tx_irretutorial_1nff_offer,
+,16,91,1792,0,0,0,1,1,0,0,0,"Price #1.1.1",11,tx_irretutorial_1nff_offer,
 ,17,-1,0,0,0,0,1,-1,0,16,0,"Price #1.1.1",11,tx_irretutorial_1nff_offer,
-,18,91,1024,0,0,0,1,1,0,0,0,"Price #1.1.2",11,tx_irretutorial_1nff_offer,
-,19,-1,256,0,0,0,1,-1,0,18,0,"Price #1.1.2",11,tx_irretutorial_1nff_offer,
-,20,91,1280,0,0,0,1,1,0,0,0,"Price #1.1.3",11,tx_irretutorial_1nff_offer,
-,21,-1,128,0,0,0,1,-1,0,20,0,"Price #1.1.3",11,tx_irretutorial_1nff_offer,
-,22,91,1,0,0,0,1,1,0,0,0,"Price #1.2.1",13,tx_irretutorial_1nff_offer,
-,23,-1,0,0,0,0,1,-1,0,22,0,"Price #1.2.1",13,tx_irretutorial_1nff_offer,
-,24,91,2,0,0,0,1,1,0,0,0,"Price #1.2.2",13,tx_irretutorial_1nff_offer,
-,25,-1,256,0,0,0,1,-1,0,24,0,"Price #1.2.2",13,tx_irretutorial_1nff_offer,
-,26,91,1,0,0,0,1,1,0,0,0,"Price #1.1.1",15,tx_irretutorial_1nff_offer,
-,27,-1,0,0,0,0,1,-1,0,26,0,"Price #1.1.1",15,tx_irretutorial_1nff_offer,
+,18,91,768,0,0,0,1,1,0,0,0,"Price #1.1.1",13,tx_irretutorial_1nff_offer,
+,19,-1,0,0,0,0,1,-1,0,18,0,"Price #1.1.1",13,tx_irretutorial_1nff_offer,
+,20,91,1024,0,0,0,1,1,0,0,0,"Price #1.1.2",13,tx_irretutorial_1nff_offer,
+,21,-1,256,0,0,0,1,-1,0,20,0,"Price #1.1.2",13,tx_irretutorial_1nff_offer,
+,22,91,1280,0,0,0,1,1,0,0,0,"Price #1.1.3",13,tx_irretutorial_1nff_offer,
+,23,-1,128,0,0,0,1,-1,0,22,0,"Price #1.1.3",13,tx_irretutorial_1nff_offer,
+,24,91,1,0,0,0,1,1,0,0,0,"Price #1.2.1",15,tx_irretutorial_1nff_offer,
+,25,-1,0,0,0,0,1,-1,0,24,0,"Price #1.2.1",15,tx_irretutorial_1nff_offer,
+,26,91,2,0,0,0,1,1,0,0,0,"Price #1.2.2",15,tx_irretutorial_1nff_offer,
+,27,-1,256,0,0,0,1,-1,0,26,0,"Price #1.2.2",15,tx_irretutorial_1nff_offer,
index bcdc34a..93375eb 100644 (file)
@@ -17,8 +17,8 @@ tx_irretutorial_1nff_hotel
 ,4,89,2,0,0,0,0,0,0,0,0,"Hotel #2",297,tt_content,,1
 ,5,89,1,0,0,0,0,0,0,0,0,"Hotel #1",298,tt_content,,1
 ,6,91,2,0,0,0,0,0,0,0,0,"Hotel #2",301,tt_content,,1
-,8,91,1,0,0,0,0,0,0,0,0,"Hotel #1",301,tt_content,,2
-,10,91,1,0,0,0,0,0,0,0,0,"Hotel #1",299,tt_content,,1
+,8,91,1,0,0,0,0,0,0,0,0,"Hotel #1",299,tt_content,,1
+,10,91,1,0,0,0,0,0,0,0,0,"Hotel #1",301,tt_content,,2
 tx_irretutorial_1nff_offer
 ,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,prices
 ,5,89,1,0,0,0,0,0,0,0,0,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
@@ -26,9 +26,9 @@ tx_irretutorial_1nff_offer
 ,7,89,1,0,0,0,0,0,0,0,0,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
 ,8,89,1,0,0,0,0,0,0,0,0,"Offer #1.1",5,tx_irretutorial_1nff_hotel,,1
 ,9,91,1,0,0,0,0,0,0,0,0,"Offer #2.1",6,tx_irretutorial_1nff_hotel,,1
-,11,91,1,0,0,0,0,0,0,0,0,"Offer #1.1",8,tx_irretutorial_1nff_hotel,,3
-,13,91,2,0,0,0,0,0,0,0,0,"Offer #1.2",8,tx_irretutorial_1nff_hotel,,2
-,15,91,1,0,0,0,0,0,0,0,0,"Offer #1.1",10,tx_irretutorial_1nff_hotel,,1
+,11,91,1,0,0,0,0,0,0,0,0,"Offer #1.1",8,tx_irretutorial_1nff_hotel,,1
+,13,91,1,0,0,0,0,0,0,0,0,"Offer #1.1",10,tx_irretutorial_1nff_hotel,,3
+,15,91,2,0,0,0,0,0,0,0,0,"Offer #1.2",10,tx_irretutorial_1nff_hotel,,2
 tx_irretutorial_1nff_price
 ,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier
 ,7,89,1,0,0,0,0,0,0,0,0,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
@@ -40,8 +40,8 @@ tx_irretutorial_1nff_price
 ,13,89,1,0,0,0,0,0,0,0,0,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
 ,14,91,1,0,0,0,0,0,0,0,0,"Price #2.1.1",9,tx_irretutorial_1nff_offer,
 ,16,91,1,0,0,0,0,0,0,0,0,"Price #1.1.1",11,tx_irretutorial_1nff_offer,
-,18,91,3,0,0,0,0,0,0,0,0,"Price #1.1.2",11,tx_irretutorial_1nff_offer,
-,20,91,2,0,0,0,0,0,0,0,0,"Price #1.1.3",11,tx_irretutorial_1nff_offer,
-,22,91,1,0,0,0,0,0,0,0,0,"Price #1.2.1",13,tx_irretutorial_1nff_offer,
-,24,91,2,0,0,0,0,0,0,0,0,"Price #1.2.2",13,tx_irretutorial_1nff_offer,
-,26,91,1,0,0,0,0,0,0,0,0,"Price #1.1.1",15,tx_irretutorial_1nff_offer,
+,18,91,1,0,0,0,0,0,0,0,0,"Price #1.1.1",13,tx_irretutorial_1nff_offer,
+,20,91,3,0,0,0,0,0,0,0,0,"Price #1.1.2",13,tx_irretutorial_1nff_offer,
+,22,91,2,0,0,0,0,0,0,0,0,"Price #1.1.3",13,tx_irretutorial_1nff_offer,
+,24,91,1,0,0,0,0,0,0,0,0,"Price #1.2.1",15,tx_irretutorial_1nff_offer,
+,26,91,2,0,0,0,0,0,0,0,0,"Price #1.2.2",15,tx_irretutorial_1nff_offer,
index bcdc34a..93375eb 100644 (file)
@@ -17,8 +17,8 @@ tx_irretutorial_1nff_hotel
 ,4,89,2,0,0,0,0,0,0,0,0,"Hotel #2",297,tt_content,,1
 ,5,89,1,0,0,0,0,0,0,0,0,"Hotel #1",298,tt_content,,1
 ,6,91,2,0,0,0,0,0,0,0,0,"Hotel #2",301,tt_content,,1
-,8,91,1,0,0,0,0,0,0,0,0,"Hotel #1",301,tt_content,,2
-,10,91,1,0,0,0,0,0,0,0,0,"Hotel #1",299,tt_content,,1
+,8,91,1,0,0,0,0,0,0,0,0,"Hotel #1",299,tt_content,,1
+,10,91,1,0,0,0,0,0,0,0,0,"Hotel #1",301,tt_content,,2
 tx_irretutorial_1nff_offer
 ,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,prices
 ,5,89,1,0,0,0,0,0,0,0,0,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3
@@ -26,9 +26,9 @@ tx_irretutorial_1nff_offer
 ,7,89,1,0,0,0,0,0,0,0,0,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1
 ,8,89,1,0,0,0,0,0,0,0,0,"Offer #1.1",5,tx_irretutorial_1nff_hotel,,1
 ,9,91,1,0,0,0,0,0,0,0,0,"Offer #2.1",6,tx_irretutorial_1nff_hotel,,1
-,11,91,1,0,0,0,0,0,0,0,0,"Offer #1.1",8,tx_irretutorial_1nff_hotel,,3
-,13,91,2,0,0,0,0,0,0,0,0,"Offer #1.2",8,tx_irretutorial_1nff_hotel,,2
-,15,91,1,0,0,0,0,0,0,0,0,"Offer #1.1",10,tx_irretutorial_1nff_hotel,,1
+,11,91,1,0,0,0,0,0,0,0,0,"Offer #1.1",8,tx_irretutorial_1nff_hotel,,1
+,13,91,1,0,0,0,0,0,0,0,0,"Offer #1.1",10,tx_irretutorial_1nff_hotel,,3
+,15,91,2,0,0,0,0,0,0,0,0,"Offer #1.2",10,tx_irretutorial_1nff_hotel,,2
 tx_irretutorial_1nff_price
 ,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier
 ,7,89,1,0,0,0,0,0,0,0,0,"Price #1.1.1",5,tx_irretutorial_1nff_offer,
@@ -40,8 +40,8 @@ tx_irretutorial_1nff_price
 ,13,89,1,0,0,0,0,0,0,0,0,"Price #1.1.1",8,tx_irretutorial_1nff_offer,
 ,14,91,1,0,0,0,0,0,0,0,0,"Price #2.1.1",9,tx_irretutorial_1nff_offer,
 ,16,91,1,0,0,0,0,0,0,0,0,"Price #1.1.1",11,tx_irretutorial_1nff_offer,
-,18,91,3,0,0,0,0,0,0,0,0,"Price #1.1.2",11,tx_irretutorial_1nff_offer,
-,20,91,2,0,0,0,0,0,0,0,0,"Price #1.1.3",11,tx_irretutorial_1nff_offer,
-,22,91,1,0,0,0,0,0,0,0,0,"Price #1.2.1",13,tx_irretutorial_1nff_offer,
-,24,91,2,0,0,0,0,0,0,0,0,"Price #1.2.2",13,tx_irretutorial_1nff_offer,
-,26,91,1,0,0,0,0,0,0,0,0,"Price #1.1.1",15,tx_irretutorial_1nff_offer,
+,18,91,1,0,0,0,0,0,0,0,0,"Price #1.1.1",13,tx_irretutorial_1nff_offer,
+,20,91,3,0,0,0,0,0,0,0,0,"Price #1.1.2",13,tx_irretutorial_1nff_offer,
+,22,91,2,0,0,0,0,0,0,0,0,"Price #1.1.3",13,tx_irretutorial_1nff_offer,
+,24,91,1,0,0,0,0,0,0,0,0,"Price #1.2.1",15,tx_irretutorial_1nff_offer,
+,26,91,2,0,0,0,0,0,0,0,0,"Price #1.2.2",15,tx_irretutorial_1nff_offer,
index f1fa121..62f7d37 100644 (file)
@@ -365,12 +365,12 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Reg
                parent::createContentAndCopyLivePage();
                $this->assertAssertionDataSet('createContentAndCopyLivePage');
 
-//             $responseSectionsLive = $this->getFrontendResponse($this->recordIds['copiedPageId'])->getResponseSections();
-//             $this->assertThat($responseSectionsLive, $this->getRequestSectionDoesNotHaveRecordConstraint()
-//                     ->setTable(static::TABLE_Content)->setField('header')->setValues('Testing #1'));
-//             $responseSectionsDraft = $this->getFrontendResponse($this->recordIds['copiedPageId'], 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
-//             $this->assertThat($responseSectionsDraft, $this->getRequestSectionDoesNotHaveRecordConstraint()
-//                     ->setTable(static::TABLE_Content)->setField('header')->setValues('Testing #1'));
+               $responseSectionsLive = $this->getFrontendResponse($this->recordIds['copiedPageId'])->getResponseSections();
+               $this->assertThat($responseSectionsLive, $this->getRequestSectionDoesNotHaveRecordConstraint()
+                       ->setTable(static::TABLE_Content)->setField('header')->setValues('Testing #1'));
+               $responseSectionsDraft = $this->getFrontendResponse($this->recordIds['copiedPageId'], 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
+               $this->assertThat($responseSectionsDraft, $this->getRequestSectionDoesNotHaveRecordConstraint()
+                       ->setTable(static::TABLE_Content)->setField('header')->setValues('Testing #1'));
        }
 
        /**
@@ -397,12 +397,12 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Reg
                parent::createPageAndCopyLiveParentPage();
                $this->assertAssertionDataSet('createPageAndCopyLiveParentPage');
 
-//             $responseSectionsLive = $this->getFrontendResponse($this->recordIds['copiedPageId'])->getResponseSections();
-//             $this->assertThat($responseSectionsLive, $this->getRequestSectionDoesNotHaveRecordConstraint()
-//                     ->setTable(static::TABLE_Page)->setField('title')->setValues('Testing #1'));
-//             $responseSectionsDraft = $this->getFrontendResponse($this->recordIds['copiedPageId'], 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
-//             $this->assertThat($responseSectionsDraft, $this->getRequestSectionDoesNotHaveRecordConstraint()
-//                     ->setTable(static::TABLE_Page)->setField('title')->setValues('Testing #1'));
+               $responseSectionsLive = $this->getFrontendResponse($this->recordIds['copiedPageId'])->getResponseSections();
+               $this->assertThat($responseSectionsLive, $this->getRequestSectionDoesNotHaveRecordConstraint()
+                       ->setTable(static::TABLE_Page)->setField('title')->setValues('Testing #1'));
+               $responseSectionsDraft = $this->getFrontendResponse($this->recordIds['copiedPageId'], 0, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
+               $this->assertThat($responseSectionsDraft, $this->getRequestSectionDoesNotHaveRecordConstraint()
+                       ->setTable(static::TABLE_Page)->setField('title')->setValues('Testing #1'));
        }
 
        /**
@@ -429,12 +429,12 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Reg
                parent::createNestedPagesAndCopyLiveParentPage();
                $this->assertAssertionDataSet('createNestedPagesAndCopyLiveParentPage');
 
-//             $responseSectionsLive = $this->getFrontendResponse($this->recordIds['copiedPageId'])->getResponseSections();
-//             $this->assertThat($responseSectionsLive, $this->getRequestSectionDoesNotHaveRecordConstraint()
-//                     ->setTable(static::TABLE_Page)->setField('title')->setValues('Testing #1'));
-//             $responseSectionsDraft = $this->getFrontendResponse($this->recordIds['copiedPageId'], 0, static::VALUE_BackendUserId, static::VALUE_WorkspaceId)->getResponseSections();
-//             $this->assertThat($responseSectionsDraft, $this->getRequestSectionDoesNotHaveRecordConstraint()
-//                     ->setTable(static::TABLE_Page)->setField('title')->setValues('Testing #1'));
+               $responseSectionsLive = $this->getFrontendResponse($this->recordIds['copiedPageId'])->getResponseSections();
+               $this->assertThat($responseSectionsLive, $this->getRequestSectionDoesNotHaveRecordConstraint()
+                       ->setTable(static::TABLE_Page)->setField('title')->setValues('Testing #1'));
+               $responseSectionsDraft = $this->getFrontendResponse($this->recordIds['copiedPageId'], 0, static::VALUE_BackendUserId, static::VALUE_WorkspaceId)->getResponseSections();
+               $this->assertThat($responseSectionsDraft, $this->getRequestSectionDoesNotHaveRecordConstraint()
+                       ->setTable(static::TABLE_Page)->setField('title')->setValues('Testing #1'));
        }
 
        /**
@@ -445,12 +445,12 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Reg
                parent::deleteContentAndCopyDraftPage();
                $this->assertAssertionDataSet('deleteContentAndCopyDraftPage');
 
-//             $responseSectionsLive = $this->getFrontendResponse($this->recordIds['copiedPageId'])->getResponseSections();
-//             $this->assertThat($responseSectionsLive, $this->getRequestSectionDoesNotHaveRecordConstraint()
-//                     ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
-//             $responseSectionsDraft = $this->getFrontendResponse($this->recordIds['copiedPageId'], 0, static::VALUE_BackendUserId, static::VALUE_WorkspaceId)->getResponseSections();
-//             $this->assertThat($responseSectionsDraft, $this->getRequestSectionDoesNotHaveRecordConstraint()
-//                     ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
+               $responseSectionsLive = $this->getFrontendResponse($this->recordIds['copiedPageId'])->getResponseSections();
+               $this->assertThat($responseSectionsLive, $this->getRequestSectionDoesNotHaveRecordConstraint()
+                       ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
+               $responseSectionsDraft = $this->getFrontendResponse($this->recordIds['copiedPageId'], 0, static::VALUE_BackendUserId, static::VALUE_WorkspaceId)->getResponseSections();
+               $this->assertThat($responseSectionsDraft, $this->getRequestSectionDoesNotHaveRecordConstraint()
+                       ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
        }
 
        /**
@@ -509,14 +509,14 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Reg
                parent::moveContentAndCopyDraftPage();
                $this->assertAssertionDataSet('moveContentAndCopyDraftPage');
 
-//             $responseSectionsLive = $this->getFrontendResponse($this->recordIds['copiedPageId'])->getResponseSections();
-//             $this->assertThat($responseSectionsLive, $this->getRequestSectionDoesNotHaveRecordConstraint()
-//                     ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #0', 'Regular Element #2'));
-//             $responseSectionsDraft = $this->getFrontendResponse($this->recordIds['copiedPageId'], 0, static::VALUE_BackendUserId, static::VALUE_WorkspaceId)->getResponseSections();
-//             $this->assertThat($responseSectionsDraft, $this->getRequestSectionDoesNotHaveRecordConstraint()
-//                     ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
-//             $this->assertThat($responseSectionsDraft, $this->getRequestSectionHasRecordConstraint()
-//                     ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #0'));
+               $responseSectionsLive = $this->getFrontendResponse($this->recordIds['copiedPageId'])->getResponseSections();
+               $this->assertThat($responseSectionsLive, $this->getRequestSectionDoesNotHaveRecordConstraint()
+                       ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #0', 'Regular Element #2'));
+               $responseSectionsDraft = $this->getFrontendResponse($this->recordIds['copiedPageId'], 0, static::VALUE_BackendUserId, static::VALUE_WorkspaceId)->getResponseSections();
+               $this->assertThat($responseSectionsDraft, $this->getRequestSectionDoesNotHaveRecordConstraint()
+                       ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #2'));
+               $this->assertThat($responseSectionsDraft, $this->getRequestSectionHasRecordConstraint()
+                       ->setTable(self::TABLE_Content)->setField('header')->setValues('Regular Element #0'));
        }
 
        /**
index d3c0635..0343709 100644 (file)
@@ -20,9 +20,7 @@ tt_content
 ,305,-1,256,0,0,0,1,-1,0,304,0,"Regular Element #3"
 ,306,91,128,0,1,304,1,1,0,0,0,"[Translate to Dansk:] Regular Element #3"
 ,307,-1,128,0,1,304,1,-1,0,306,0,"[Translate to Dansk:] Regular Element #3"
-,308,91,64,0,0,0,1,1,0,0,0,"Regular Element #1"
-,309,-1,64,0,0,0,1,-1,0,308,0,"Regular Element #1"
-,310,91,32,0,0,0,1,1,0,0,0,"Regular Element #2"
-,311,-1,32,0,0,0,1,-1,0,310,0,"Regular Element #2"
-,312,91,16,0,0,0,1,1,0,0,0,"Regular Element #1"
-,313,-1,16,0,0,0,1,-1,0,312,0,"Regular Element #1"
+,308,91,64,0,0,0,1,1,0,0,0,"Regular Element #2"
+,309,-1,64,0,0,0,1,-1,0,308,0,"Regular Element #2"
+,310,91,32,0,0,0,1,1,0,0,0,"Regular Element #1"
+,311,-1,32,0,0,0,1,-1,0,310,0,"Regular Element #1"
index 63b93fc..68fbc42 100644 (file)
@@ -17,6 +17,5 @@ tt_content
 ,303,89,640,0,0,0,1,3,0,0,297,"[MOVE-TO PLACEHOLDER for #297, WS#1]"
 ,304,91,256,0,0,0,0,0,0,0,0,"Regular Element #3"
 ,305,91,128,0,1,304,0,0,0,0,0,"[Translate to Dansk:] Regular Element #3"
-,306,91,64,0,0,0,0,0,0,0,0,"[MOVE-TO PLACEHOLDER for #297, WS#1]"
-,307,91,32,0,0,0,0,0,0,0,0,"Regular Element #2"
-,308,91,16,0,0,0,0,0,0,0,0,"Regular Element #1"
+,306,91,64,0,0,0,0,0,0,0,0,"Regular Element #2"
+,307,91,32,0,0,0,0,0,0,0,0,"Regular Element #1"
index 4d898f9..b9f040b 100644 (file)
@@ -9,8 +9,6 @@ pages
 ,93,91,256,0,1,1,0,0,0,"Testing #2"
 ,94,-1,256,0,1,-1,0,93,0,"Testing #2"
 ,95,90,256,0,0,0,0,0,0,Relations
-,96,95,256,0,0,0,0,0,0,"Testing #1"
-,97,96,256,0,0,0,0,0,0,"Testing #2"
 tt_content
 ,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header
 ,296,88,256,0,0,0,0,0,0,0,0,"Regular Element #0"
index fe33feb..1a787ec 100644 (file)
@@ -7,7 +7,6 @@ pages
 ,91,89,256,0,1,1,0,0,0,"Testing #1"
 ,92,-1,256,0,1,-1,0,91,0,"Testing #1"
 ,93,90,256,0,0,0,0,0,0,Relations
-,94,93,256,0,0,0,0,0,0,"Testing #1"
 tt_content
 ,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header
 ,296,88,256,0,0,0,0,0,0,0,0,"Regular Element #0"
index 4e8f557..21018c4 100644 (file)
@@ -19,7 +19,5 @@ tt_content
 ,304,-1,256,0,0,0,1,-1,0,303,0,"Regular Element #3"
 ,305,91,128,0,1,303,1,1,0,0,0,"[Translate to Dansk:] Regular Element #3"
 ,306,-1,128,0,1,303,1,-1,0,305,0,"[Translate to Dansk:] Regular Element #3"
-,307,91,64,0,0,0,1,1,0,0,0,"Regular Element #2"
-,308,-1,64,0,0,0,1,-1,0,307,0,"Regular Element #2"
-,309,91,32,0,0,0,1,1,0,0,0,"Regular Element #1"
-,310,-1,32,0,0,0,1,-1,0,309,0,"Regular Element #1"
+,307,91,64,0,0,0,1,1,0,0,0,"Regular Element #1"
+,308,-1,64,0,0,0,1,-1,0,307,0,"Regular Element #1"
index b5a2e00..27a81d9 100644 (file)
@@ -22,9 +22,7 @@ tt_content
 ,307,-1,256,0,0,0,1,-1,0,306,0,"Regular Element #3"
 ,308,91,128,0,1,306,1,1,0,0,0,"[Translate to Dansk:] Regular Element #3"
 ,309,-1,128,0,1,306,1,-1,0,308,0,"[Translate to Dansk:] Regular Element #3"
-,310,91,64,0,0,0,1,1,0,0,0,"Regular Element #2"
-,311,-1,64,0,0,0,1,-1,0,310,0,"Regular Element #2"
-,312,91,32,0,0,0,1,1,0,0,0,"Regular Element #1"
-,313,-1,32,0,0,0,1,-1,0,312,0,"Regular Element #1"
-,314,91,16,0,0,0,1,1,0,0,0,"Regular Element #0"
-,315,-1,16,0,0,0,1,-1,0,314,0,"Regular Element #0"
+,310,91,64,0,0,0,1,1,0,0,0,"Regular Element #1"
+,311,-1,64,0,0,0,1,-1,0,310,0,"Regular Element #1"
+,312,91,32,0,0,0,1,1,0,0,0,"Regular Element #0"
+,313,-1,32,0,0,0,1,-1,0,312,0,"Regular Element #0"
index 530499b..46fd4be 100644 (file)
@@ -21,4 +21,3 @@ tt_content
 ,307,91,128,0,1,306,0,0,0,0,0,"[Translate to Dansk:] Regular Element #3"
 ,308,91,64,0,0,0,0,0,0,0,0,"Regular Element #2"
 ,309,91,32,0,0,0,0,0,0,0,0,"Regular Element #1"
-,310,91,16,0,0,0,0,0,0,0,0,"[MOVE-TO PLACEHOLDER for #296, WS#1]"