[BUGFIX] Set pageId in WorkspacePreview in InlineSettings 98/58998/4
authorDevid Messner <devid.messner@raiffeisen.it>
Fri, 30 Nov 2018 11:16:44 +0000 (12:16 +0100)
committerBenni Mack <benni@typo3.org>
Tue, 8 Jan 2019 07:36:05 +0000 (08:36 +0100)
The page ID is necessary for publishing and changing the stage.
Otherwise, the entire workspace is always published.

Resolves: #87047
Releases: master, 9.5
Change-Id: I4154810e79d776d41315d2d7029352fa86eff5d0
Reviewed-on: https://review.typo3.org/58998
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Achim Fritz <af@achimfritz.de>
Tested-by: Achim Fritz <af@achimfritz.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/workspaces/Classes/Controller/PreviewController.php

index 7602327..41d0aae 100644 (file)
@@ -174,7 +174,8 @@ class PreviewController
         // Build the "list view" link to the review controller
         $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
         $wsSettingsUrl = $uriBuilder->buildUriFromRoute('web_WorkspacesWorkspaces', [
-            'tx_workspaces_web_workspacesworkspaces' => ['action' => 'singleIndex']
+            'tx_workspaces_web_workspacesworkspaces' => ['action' => 'singleIndex'],
+            'id' => $this->pageId
         ], UriBuilder::ABSOLUTE_URL);
 
         // Evaluate available preview modes
@@ -188,6 +189,7 @@ class PreviewController
             $splitPreviewModes = $allPreviewModes;
         }
         $this->moduleTemplate->getPageRenderer()->addInlineSetting('Workspaces', 'SplitPreviewModes', $splitPreviewModes);
+        $this->moduleTemplate->getPageRenderer()->addInlineSetting('Workspaces', 'id', $this->pageId);
 
         $this->view->assignMultiple([
             'logoLink' => TYPO3_URL_GENERAL,