Project

General

Profile

Actions

Bug #88036

closed

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

Added by Stephan Großberndt about 5 years ago. Updated about 4 years ago.

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

0%

Estimated time:
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 3 (0 open3 closed)

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

Actions
Related to TYPO3 Core - Feature #90567: Prevent saving of content element type "plugin" without Selected Plugin [list_type]Closed2020-02-28

Actions
Related to TYPO3 Core - Bug #92413: Exception when no plugin is selectedClosed2020-09-25

Actions
Actions #1

Updated by Claus Due about 5 years 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.

Actions #4

Updated by Georg Ringer about 5 years ago

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

Updated by Helmut Hummel about 5 years 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?

Actions #6

Updated by Helmut Hummel about 5 years 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.

Actions #7

Updated by Stephan Großberndt about 5 years ago

  • Status changed from Needs Feedback to New

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

Actions #8

Updated by Georg Ringer about 5 years 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

Actions #9

Updated by Georg Ringer about 4 years ago

  • Related to Feature #90567: Prevent saving of content element type "plugin" without Selected Plugin [list_type] added
Actions #10

Updated by Georg Ringer about 4 years ago

  • Status changed from New to Accepted
Actions #11

Updated by Gerrit Code Review about 4 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63527

Actions #12

Updated by Georg Ringer about 4 years ago

  • Status changed from Under Review to Rejected

I am closing this issue as the exception is only shown if config.contentObjectExceptionHandler = 0 is used, otherwise just the one element is not shown which is fine. the issue is logged as well.

Actions #13

Updated by Georg Ringer over 3 years ago

  • Related to Bug #92413: Exception when no plugin is selected added
Actions

Also available in: Atom PDF