Bug #93759
closedFluid page module: not able to unset preview-header in "tt_content_drawItem" hook
0%
Description
The issue¶
This issue is about the new PreviewRenderer vs PageLayoutView.
Particularly this hook:
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']
Here you have the hook called in the new StandardContentPreviewRenderer:
But when you look closely, the argument-variable $hookPreviewContent is not previously defined.
So despite it is passed by reference, you end up modifying a variable in the hook-function - without any effect.
In comparison with the old PageLayoutView, you can see the difference:
The $outHeader is determined right before the hook.
When you step up you can see, that preview-header and preview-content are processed separately and preview-header is not further passed to renderPageModulePreviewContent so it may be manipulated in the "tt_content_drawitem"-hook as always before.
How to solve?¶
I can see the intent to separate preview-header from preview-content. It makes sense somehow.
But how can we restore the original behaviour of the hook? Or should it be restored at all? -> Refactoring the PreviewRendererInterface to provide an additional argument to "renderPageModulePreviewContent" may be a quick solution - but looks rather like a workaround.
Should we dispatch a PSR-14 event somwhere here to make modification of preview-header and preview-content possible again?
Files
Updated by Oliver Bartsch about 3 years ago
- Related to Bug #91760: Overriding header of content elements not possible with new fluid based page module added
Updated by Christian Weiske about 3 years ago
The regression was introduced in #90906, and also affects TYPO3 v10.4.
Updated by Christian Weiske about 3 years ago
- Related to Bug #90906: Custom preview is rendered after fluid preview in Page Module added
Updated by Oliver Bartsch almost 3 years ago
- Status changed from New to Closed
Hi, I'm closing this since the bug has been fixed in the related issue #91760. In case there is still something not working as expected, please contact me, so I can reopen the issue. Otherwise you can also create a new issue with a reference to this one.