[BUGFIX] Use correct backend layout in FE 65/44365/5
authorMarkus Klein <markus.klein@typo3.org>
Thu, 29 Oct 2015 17:31:33 +0000 (18:31 +0100)
committerMarkus Klein <markus.klein@typo3.org>
Mon, 9 Nov 2015 11:21:18 +0000 (12:21 +0100)
Skip unqualified pages for backend layout determination.
This is basically a copy of the code already present in
BackendLayoutView::getSelectedCombinedIdentifier().

Resolves: #71086
Releases: master
Change-Id: I420a5f042e56b879f4fb222ed00c0e8f51541cfd
Reviewed-on: https://review.typo3.org/44365
Tested-by: Wolfgang Wagner <wolfgang.wagner.fn@gmail.com>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php

index d426428..8517ac2 100644 (file)
@@ -5950,7 +5950,11 @@ class ContentObjectRenderer
                             $retVal = 'none';
                         } elseif ($retVal === '' || $retVal === '0') {
                             // If it not set check the root-line for a layout on next level and use this
-                            foreach ($tsfe->rootLine as $rootLinePage) {
+                            // Remove first element, which is the current page
+                            // See also \TYPO3\CMS\Backend\View\BackendLayoutView::getSelectedCombinedIdentifier()
+                            $rootLine = $tsfe->rootLine;
+                            array_shift($rootLine);
+                            foreach ($rootLine as $rootLinePage) {
                                 $retVal = (string) $rootLinePage['backend_layout_next_level'];
                                 // If layout for "next level" is set to "none" - don't use any and stop searching
                                 if ($retVal === '-1') {