Example: Page layout with 3 areas colPos 0, 1 and 2.
Place several elements, which creates a flux grid in colPos 0.
Place further elements in colPos 1 and 2.
Now select a page layout that only uses colPos 0.
All elements from colPos 1 and colPos 2 are then displayed as unused elements. The unused elements are displayed in each flux grid column of the elements of colPos 0. So several times instead of once at the end of the page. Sometimes TYPO3 freezes in the process.
Expected behavior
The unused elements should only be displayed once in the main view of the page layout.
I have checked that the bug exists in the
dev-development
branch _YesI have checked that there are no already open issues or recently closed issues about this bug _Yes
Describe the bug Backend Layout View The renderGrid function displays unused elements each time it is called. https://github.com/FluidTYPO3/flux/blob/907b7abc436c51fa6cc124dce01abb6666226dac/Classes/Integration/PreviewView.php#L145
To Reproduce Steps to reproduce the behavior:
Example: Page layout with 3 areas colPos 0, 1 and 2. Place several elements, which creates a flux grid in colPos 0.
Place further elements in colPos 1 and 2.
Now select a page layout that only uses colPos 0. All elements from colPos 1 and colPos 2 are then displayed as unused elements. The unused elements are displayed in each flux grid column of the elements of colPos 0. So several times instead of once at the end of the page. Sometimes TYPO3 freezes in the process.
Expected behavior The unused elements should only be displayed once in the main view of the page layout.
Solution https://github.com/FluidTYPO3/flux/blob/907b7abc436c51fa6cc124dce01abb6666226dac/Classes/Integration/PreviewView.php#L173 When calling drawContent, the third parameter should be set to "false" so that the unused page elements are only determined once and not when rendering in each grid in the backend layout view.
$content .= $pageLayoutView->drawContent($GLOBALS['TYPO3_REQUEST'], $pageLayoutView->getContext(), false);