Issue Bug Closed

#94203Exception when setting extbase variables in FLUIDTEMPLATE content object

Oliver Bartsch 05/26/21, 21:01 updated 09/07/21, 07:40

Description

Using extbase variables in a FLUIDTEMPLATE content object leads to following exception:

ArgumentCountError
Too few arguments to function TYPO3\CMS\Extbase\Mvc\Web\RequestBuilder::build(), 0 passed in /var/www/html/typo3/sysext/frontend/Classes/ContentObject/FluidTemplateContentObject.php on line 284 and exactly 1 expected

Example setup to test:

Typoscript

page = PAGE
page {
  typeNum = 0
  10 = COA_INT
  10 {
    10 = FLUIDTEMPLATE
    10 {
      file = fileadmin/templates/form.html
      settings {
        persistenceIdentifier = fileadmin/form_definitions/contact.form.yaml
      }
      extbase.pluginName = Formframework
      extbase.controllerExtensionName = Form
      extbase.controllerName = FormFrontend
      extbase.controllerActionName = perform
    }
  }
}

fileadmin/templates/form.html

<formvh:render persistenceIdentifier="{settings.persistenceIdentifier}" />

fileadmin/form_definitions/contact.form.yaml

renderingOptions:
  submitButtonLabel: Submit
type: Form
identifier: something
label: something
prototypeName: standard
renderables:
  -
    renderingOptions:
      previousButtonLabel: 'Previous step'
      nextButtonLabel: 'Next step'
    type: Page
    identifier: page-1
    label: Step
    renderables:
      -
        defaultValue: ''
        type: Telephone
        identifier: telephone-1
        label: 'Telephone number'

Reviews 1