[BUGFIX] Allow opening custom doktype in the frontend 36/48036/2
authorWouter Wolters <typo3@wouterwolters.nl>
Sat, 7 May 2016 15:20:43 +0000 (17:20 +0200)
committerFrank Naegler <frank.naegler@typo3.org>
Mon, 9 May 2016 11:12:56 +0000 (13:12 +0200)
A few doktype are checked now to open the frontend page.
Others will redirect to the homepage. Allow custom doktypes now
too with opening the frontend page.

Resolves: #75499
Resolves: #70094
Releases: master,7.6
Change-Id: Iaffe03dfff3f1181f26964f26611d80e71406b5c
Reviewed-on: https://review.typo3.org/48036
Tested-by: Riccardo De Contardi <erredeco@gmail.com>
Reviewed-by: Zbigniew Jacko <z.jacko@macopedia.pl>
Tested-by: Zbigniew Jacko <z.jacko@macopedia.pl>
Tested-by: Marcin Krzy┼╝anowski
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/backend/Classes/Controller/EditDocumentController.php

index b6543e8..36de73c 100644 (file)
@@ -851,11 +851,9 @@ class EditDocumentController extends AbstractModule
             $rootPageData = null;
             $rootLine = BackendUtility::BEgetRootLine($currentPageId);
             $currentPage = reset($rootLine);
-            if ((int)$currentPage['doktype'] === PageRepository::DOKTYPE_DEFAULT
-                || (int)$currentPage['doktype'] === PageRepository::DOKTYPE_LINK
-                || (int)$currentPage['doktype'] === PageRepository::DOKTYPE_SHORTCUT
-                || (int)$currentPage['doktype'] === PageRepository::DOKTYPE_MOUNTPOINT
-            ) {
+            // Allow all doktypes below 200
+            // This makes custom doktype work as well with opening a frontend page.
+            if ((int)$currentPage['doktype'] <= PageRepository::DOKTYPE_SPACER) {
                 // try the current page
                 $previewPageId = $currentPageId;
             } else {