Issue Bug Closed

#100872currentContentObject is not always available

Alexander Stehlik 05/13/23, 14:40 updated 07/09/24, 12:56

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.

Reviews 2