Bug #92758
closedIncorrect fallback of previewRenderer when using fluidBasedPageModule
100%
Description
How to reproduce¶
1. Use a v10 TYPO3
2. Enable fluidBasedPageModule as feature
3. Add a custom preview renderer with $GLOBALS['TCA']['tt_content']['types']['list']['previewRenderer']['extension_plugin'] = \Vendor\Extension\Backend\Preview\PreviewRenderer::class;
4. Install extension using plugins by default, in my case sf_event_mgt
5. Create a page with a plugin of the default extension
Error¶
Loading the page in page module in backend throws an exception with "Class Array must implement PreviewRendererInterface".
When debugging the method "resolveRendererFor" in class \TYPO3\CMS\Backend\Preview\StandardPreviewRendererResolver, it gives me an array (with my custom preview renderer class inside) when trying to load the PreviewRenderer for the default extension plugin.
Solution¶
From line 61 on the class want to provide a fallback if there is no custom PreviewRenderer as there is no one for the default extension. But the fallback gives me an array instead of the class name.
For the fallback there should be used $tcaTypeField['previewRenderer']
instead of $typeConfiguration['previewRenderer']
.