[BUGFIX] Shortcut to first sub-page with move placeholder does not work 62/45062/2
authorOliver Hader <oliver@typo3.org>
Mon, 30 Nov 2015 13:44:33 +0000 (14:44 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Mon, 30 Nov 2015 20:31:07 +0000 (21:31 +0100)
Shortcuts to the first sub-page with that one being moved in a workspace
lead to an exception in previewing in a workspace context. Reason is that
the move-placeholder of the valid target in the live workspace is being
disabled in a workspace which is not checked further.

Resolves: #71984
Releases: master
Change-Id: I671611b63f9baea5ff310bcbd30b42e6378580c9
Reviewed-on: https://review.typo3.org/45062
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/frontend/Classes/Page/PageRepository.php

index 7483787..462ec0c 100644 (file)
@@ -624,6 +624,11 @@ class PageRepository
 
             // Versioning Preview Overlay
             $this->versionOL('pages', $page, true);
+            // Skip if page got disabled due to version overlay
+            // (might be delete or move placeholder)
+            if (empty($page)) {
+                continue;
+            }
 
             // Add a mount point parameter if needed
             $page = $this->addMountPointParameterToPage((array)$page);