Bug #92406
openUsing formvh:render without extbase context results in Exception
100%
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.
Updated by Gerrit Code Review over 3 years ago
- Status changed from New to Under Review
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 3 years ago
Patch set 3 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70513
Updated by Gerrit Code Review over 3 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 3 years ago
Patch set 4 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70513
Updated by Gerrit Code Review over 3 years ago
Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 3 years ago
Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 3 years ago
Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 3 years ago
Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Björn Jacob over 3 years ago
- Related to Feature #91419: Disable caching on a per form basis added
Updated by Gerrit Code Review over 3 years ago
Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 3 years ago
Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 3 years ago
Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 3 years ago
Patch set 5 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70513
Updated by Gerrit Code Review over 3 years ago
Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 3 years ago
Patch set 6 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70513
Updated by Gerrit Code Review over 3 years ago
Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 3 years ago
Patch set 18 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 3 years ago
Patch set 19 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 3 years ago
Patch set 20 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 3 years ago
Patch set 7 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70513
Updated by Gerrit Code Review over 3 years ago
Patch set 21 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 3 years ago
Patch set 22 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 3 years ago
Patch set 8 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70513
Updated by Gerrit Code Review over 3 years ago
Patch set 23 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review about 3 years ago
Patch set 24 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review about 3 years ago
Patch set 25 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review about 3 years ago
Patch set 26 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review almost 3 years ago
Patch set 27 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 28 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 29 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 30 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 31 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 32 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 33 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 34 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 35 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 36 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 37 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 38 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 39 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 40 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 41 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 42 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 43 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 44 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 45 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 46 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 47 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 48 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 49 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 50 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 51 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 52 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 53 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 54 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 55 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460
Updated by Gerrit Code Review over 2 years ago
Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75013
Updated by Gerrit Code Review over 2 years ago
Patch set 2 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75013
Updated by Gerrit Code Review over 2 years ago
Patch set 3 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75013
Updated by Ralf Zimmermann over 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 667346aee4ca1ee22e0530dbfdc71f84fb2b1aa0.
Updated by Gerrit Code Review over 2 years ago
- Status changed from Resolved to Under Review
Patch set 4 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75013
Updated by Gerrit Code Review over 2 years ago
Patch set 5 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75013
Updated by Gerrit Code Review over 2 years ago
Patch set 6 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75013
Updated by Gerrit Code Review over 2 years ago
Patch set 7 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75013
Updated by Gerrit Code Review over 2 years ago
Patch set 8 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75013
Updated by Gerrit Code Review over 2 years ago
Patch set 9 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75013
Updated by Ralf Zimmermann over 2 years ago
- Status changed from Under Review to Resolved
Applied in changeset 9f933f2cf1c05709962c9efa2dd1951e7ad9a6a7.
Updated by Tim Obert over 2 years ago
Is there already a plan when the patch for 10.4 will be started?
Updated by Gerrit Code Review over 2 years ago
- Status changed from Resolved to Under Review
Patch set 9 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70513
Updated by Gerrit Code Review over 2 years ago
Patch set 10 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70513
Updated by Gerrit Code Review over 2 years ago
Patch set 11 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70513
Updated by Gerrit Code Review over 2 years ago
Patch set 12 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70513
Updated by Gerrit Code Review over 2 years ago
Patch set 13 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70513
Updated by Gerrit Code Review over 2 years ago
Patch set 14 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70513
Updated by Elias Häußler about 2 years ago
- Related to Bug #98222: Inconsistent form rendering after #93887 added
Updated by Christian Kuhn almost 2 years ago
- Status changed from Under Review to New
Updated by Daniel Siepmann 11 months ago · Edited
Looks like the issue still exists in TYPO3 v12:
(1/1) TypeError TYPO3\CMS\Form\Domain\Model\FormDefinition::bind(): Argument #1 ($request) must be of type TYPO3\CMS\Extbase\Mvc\RequestInterface, TYPO3\CMS\Core\Http\ServerRequest given, called in /vendor/typo3/cms-form/Classes/ViewHelpers/RenderViewHelper.php on line 97
We have the following "workaround":
TypoScript:
variables { form = COA form { 5 = USER 5 { userFunc = Codappix\SiteCodappix\UserFunc\Form->prepare } 10 = EXTBASEPLUGIN 10 { extensionName = Form pluginName = Formframework } } }
The UserFunction is executed prior the plugin and will populate the pi_flexform accordingly.
Minimum example:
<?php
declare(strict_types=1);
namespace Codappix\SiteCodappix\UserFunc;
use TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
final class Form
{
private ContentObjectRenderer $renderer;
public function setContentObjectRenderer(ContentObjectRenderer $renderer): void
{
$this->renderer = $renderer;
}
public function prepare(
): string {
$flexForm = [
'data' => [
'sDEF' => [
'lDEF' => [
'settings.persistenceIdentifier' => $this->renderer->data['codappix_form'] ?? '',
],
],
],
];
$flexFormTools = GeneralUtility::makeInstance(FlexFormTools::class);
$this->renderer->data['pi_flexform'] = $flexFormTools->flexArray2Xml($flexForm, true);
return '';
}
}
This can be fine tuned per case, e.g. use configuration to dynamically fetch the identifier from somewhere else, merge it with existing pi_flexform, etc.
One than can use the following in Fluid:
{form -> f:format.raw()}