Issue Bug Closed

#100786Using userFunc for rendering form creates a PHP warning

Joey Bouten 05/02/23, 13:08 updated 07/09/24, 21:12

Description

When using

lib.planAppointmentForm = USER
lib.planAppointmentForm {
  userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
  extensionName = Form
  pluginName = Formframework
  vendorName = TYPO3\CMS
  actionName = render

  settings {
    persistenceIdentifier = EXT:site_template/Configuration/Forms/myform.form.yaml
  }
  stdWrap.wrap = <div id="c-form" class="c-form__plan-appointment">|</div>
}

The following warning occurs:

PHP Warning: Trying to access array offset on value of type null in /var/www/html/Web/typo3/sysext/form/Classes/Controller/FormFrontendController.php line 75

When using the userFunc, data can be empty and

$formDefinition['identifier'] .= '-' . $this->configurationManager->getContentObject()->data['uid'];
fails.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.