Bug #88036

Adding a ce of type "plugin" without defining a plugin breaks FE

Added by Stephan Großberndt 8 months ago. Updated 7 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Fluid Styled Content
Target version:
-
Start date:
2019-03-29
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Create a content element of type "plugin" but do not define a plugin to use in list_type.
This is valid when saving in backend currently and does not show up as a problem.

Up to TYPO3 8.7 this just leads to no output in the FE, in TYPO3 9.5.5 an exception is thrown:

(1/1) #1540246570 TYPO3Fluid\Fluid\Core\ViewHelper\Exception

No Content Object definition found at TypoScript object path "tt_content.list.20." 

in /typo3_src-9.5.5/typo3/sysext/fluid/Classes/ViewHelpers/CObjectViewHelper.php line 132

Related issues

Related to TYPO3 Core - Bug #86729: CObjectVIewHelper does not render top level object path Closed 2018-10-24

History

#1 Updated by Claus Due 8 months ago

  • Category changed from Fluid to Fluid Styled Content

This looks like it is caused by changes to f:cObject which resolves the TS path segment by segment and throws a new type of error if not found, combined with the fact that this ViewHelper is called indiscriminately (no check for actually filled `list_type`) from the template that renders the output body.

Since we will not avoid throwing the exception (it was after all added intentionally as developer feedback help) the way to fix this is to avoid calling the ViewHelper in the template for those values that are predictably never going to work. Therefore I'm changing the category to Fluid Styled Content.

This issue can be returned to Fluid category if there is a wish/need for further validation and different exception messages if, for example, the received TS path ends with a dot. I personally think the message there is now, is helpful enough since it shows the entire path that was passed so you can quickly identify the cause is an empty value appended to the path when calling the ViewHelper.

#2 Updated by Georg Ringer 7 months ago

  • Related to Bug #8672: Userlist: Nav-Links not working as they should added

#3 Updated by Georg Ringer 7 months ago

  • Related to deleted (Bug #8672: Userlist: Nav-Links not working as they should)

#4 Updated by Georg Ringer 7 months ago

  • Related to Bug #86729: CObjectVIewHelper does not render top level object path added

#5 Updated by Helmut Hummel 7 months ago

  • Status changed from New to Needs Feedback

Can you elaborate on the use case of defining a plugin, but not defining a rendering definition for it?

#6 Updated by Helmut Hummel 7 months ago

OK, got it. It is about an editor creating a plugin content element without selecting a plugin.
This case should imho be fixed with a validation in TCA, not allowing editors to create such elements.
Alternative would be indeed fixing FSC, as Claus suggested to restore the old behaviour, or to output an error message.

#7 Updated by Stephan Großberndt 7 months ago

  • Status changed from Needs Feedback to New

That would be an option too. It should just not throw an exception.

#8 Updated by Georg Ringer 7 months ago

Imo backend is not an option as eg if once an editor creates a plugin and then the extension is removed, the exception will also be thrown

Also available in: Atom PDF