Bug #92406

Using formvh:render without extbase context results in Exception

Added by Daniel Siepmann 2 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2020-09-25
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Using

<formvh:render persistenceIdentifier="EXT:sitepackage/Resources/Private/Forms/enquiry.form.yaml" />
inside an arbitrary Fluid template results in
Argument 1 passed to TYPO3\CMS\Extbase\Service\ExtensionService::getPluginNameByAction() must be of the type string, null given, called in /var/www/html/public/typo3/sysext/extbase/Classes/Mvc/Web/Routing/UriBuilder.php on line 609
. It looks like the reason is
$form = $formDefinition->bind($renderingContext->getControllerContext()->getRequest(), $response);
inside the ViewHelper.

I guess it should be possible to detect the state, and create a fake request with the expected defaults to the EXT:form plugin itself to make it way easier. Alternatively one could set the necessary info through additional arguments. Just like in the example when using FLUIDTEMPLATE: https://docs.typo3.org/c/typo3/cms-form/10.4/en-us/I/Concepts/FrontendRendering/Index.html#render-through-fluidtemplate-without-controller

It would make usage of EXT:form much easier if that would work out of the box.

No data to display

Also available in: Atom PDF