Project

General

Profile

Actions

Bug #100872

closed

currentContentObject is not always available

Added by Alexander Stehlik 12 months ago. Updated 9 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2023-05-13
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When using the EXTBASEPLUGIN content element outside the lib.contentElement context the request attribute currentContentObject is not filled correctly.

The problem only occurs when the content is rendered with the f:cObject view helper in a FLUIDTEMPLATE content object. This is a minimal page setup with fluid_styled_content TypoScript included:

lib.content.main < styles.content.get

page = PAGE
page.100 = FLUIDTEMPLATE
page.100.template = TEXT
page.100.template.value = <p>The form</p><f:cObject typoscriptObjectPath="lib.content.main"/>

It can be tested by changing the config of the form_formframework content element:

This works (the default config):

tt_content.form_formframework =< lib.contentElement
tt_content.form_formframework {
    20 = EXTBASEPLUGIN
    20 {
        extensionName = Form
        pluginName = Formframework        
    }
    templateName = Generic 
}

When rendering the plugin directly, the currentContentObject is null :

tt_content.form_formframework >
tt_content.form_formframework = EXTBASEPLUGIN
tt_content.form_formframework {
    extensionName = Form
    pluginName = Formframework
}

And maybe this is related: I just realized that the settings-Array is also empty in the second example.


Files


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Task #100623: Provide current content object as request attributeClosed2023-04-16

Actions
Related to TYPO3 Core - Bug #101201: Clean up ContenObjectRenderer usageResolved2023-06-29

Actions
Related to TYPO3 Core - Bug #101170: ContentObjectRenderer instance is not always and not properly added as request attributeResolved2023-06-26

Actions
Actions

Also available in: Atom PDF