Project

General

Profile

Actions

Bug #92758

closed

Incorrect fallback of previewRenderer when using fluidBasedPageModule

Added by Thomas Löffler over 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
Start date:
2020-11-03
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:

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'].

Actions

Also available in: Atom PDF