Project

General

Profile

Actions

Bug #92406

open

Using formvh:render without extbase context results in Exception

Added by Daniel Siepmann over 3 years ago. Updated 4 months ago.

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

100%

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

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.


Related issues 2 (1 open1 closed)

Related to TYPO3 Core - Feature #91419: Disable caching on a per form basisUnder Review2020-05-16

Actions
Related to TYPO3 Core - Bug #98222: Inconsistent form rendering after #93887Closed2022-08-29

Actions
Actions

Also available in: Atom PDF