[BUGFIX] Fix interaction with versions on "All workspaces" tab 06/51006/5
authorOliver Hader <oliver@typo3.org>
Tue, 20 Dec 2016 12:08:57 +0000 (13:08 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 31 Dec 2016 14:36:38 +0000 (15:36 +0100)
Interacting with workspace versions using the "All workspaces"
tab in the workspace module was not possible. The process tried
to use the current workspace, which in this case was the virtual
workspace with ID -98 - which of course did not exist.

Change-Id: If512ef8ccc838348230531450e82b25a00f27908
Resolves: #79048
Releases: master, 7.6
Reviewed-on: https://review.typo3.org/51006
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/workspaces/Classes/ExtDirect/ActionHandler.php
typo3/sysext/workspaces/Classes/Service/WorkspaceService.php

index b49cc98..93e5186 100644 (file)
@@ -677,7 +677,7 @@ class ActionHandler extends AbstractHandler
                 'style' => 'max-height: 200px',
                 'autoScroll' => true,
                 'items' => [
-                    $this->getReceipientsOfStage($nextStage->getUid())
+                    $this->getReceipientsOfStage($nextStage)
                 ]
             ];
             $result['items'][] = [
index 8c8df33..b16d20b 100644 (file)
@@ -76,15 +76,11 @@ class WorkspaceService implements SingletonInterface
         // Avoid invalid workspace settings
         if ($activeId !== null && $activeId !== self::SELECT_ALL_WORKSPACES) {
             $availableWorkspaces = $this->getAvailableWorkspaces();
-            if (!isset($availableWorkspaces[$activeId])) {
-                $activeId = null;
+            if (isset($availableWorkspaces[$activeId])) {
+                $workspaceId = $activeId;
             }
         }
 
-        if ($activeId !== null) {
-            $workspaceId = $activeId;
-        }
-
         return $workspaceId;
     }