Bug #88036
closedAdding a ce of type "plugin" without defining a plugin breaks FE
0%
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
Updated by Claus Due over 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.
Updated by Georg Ringer over 5 years ago
- Related to Bug #86729: CObjectVIewHelper does not render top level object path added
Updated by Helmut Hummel over 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?
Updated by Helmut Hummel over 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.
Updated by Stephan Großberndt over 5 years ago
- Status changed from Needs Feedback to New
That would be an option too. It should just not throw an exception.
Updated by Georg Ringer over 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
Updated by Georg Ringer over 4 years ago
- Related to Feature #90567: Prevent saving of content element type "plugin" without Selected Plugin [list_type] added
Updated by Gerrit Code Review over 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
Updated by Georg Ringer over 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.
Updated by Georg Ringer about 4 years ago
- Related to Bug #92413: Exception when no plugin is selected added