#96579FLUIDTEMPLATE always uses default action to find the template
Description
FLUIDTEMPLATE always uses default Extbase action to find the template even if you specify extbase.controllerActionName. Example:
10 = FLUIDTEMPLATE
10 {
extbase {
controllerActionName = logout
controllerExtensionName = Felogin
controllerName = Login
pluginName = Login
}
settings < plugin.tx_felogin_login.settings
templateRootPaths {
10 = EXT:template/Resources/Private/Plugins/FeLogin/BoxTemplates/
}
It will still render the login action.
Problem seems to be in FluidTemplateContentObject::renderFluidView(), which does not pass action name to the view as it should:
protected function renderFluidView()
{
return $this->view->render();
}
In the view:
public function render($actionName = null)
{
$renderingContext = $this->getCurrentRenderingContext();
$templateParser = $renderingContext->getTemplateParser();
$templatePaths = $renderingContext->getTemplatePaths();
if ($actionName) {
$actionName = ucfirst($actionName);
$renderingContext->setControllerAction($actionName);
}
Here there will be no action, so rendering context will always contain default action for controller.
Also it is not worth trying templateName because it will not be used if there is Extbase controller & plugin specified. So there is no way to use any action except the default one.
The fix: pass action to the view.
Reviews 2
Related issues 1
History 47
-
Riccardo De Contardi commented <span data-processor="relativetime" data-value="2022-09-25T08:12:51+00:00" > 09/25/22, 08:12 </span>
Is this related #81099 or a different one?
-
Garvin Hicking changed Related to #82033 <span data-processor="relativetime" data-value="2024-07-12T11:09:10+00:00" > 07/12/24, 11:09 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 96676 status
NewUnder Review <span data-processor="relativetime" data-value="2026-10-14T08:01:10+00:00" > 10/14/26, 08:01 </span> -
Gerrit Code Review pushed patch set 1 for 14.3 to change 96747 <span data-processor="relativetime" data-value="2026-10-16T06:23:47+00:00" > 10/16/26, 06:23 </span>
-
Gerrit Code Review pushed patch set 2 for 14.3 to change 96747 <span data-processor="relativetime" data-value="2026-10-16T13:55:02+00:00" > 10/16/26, 13:55 </span>
-
Benni Mack commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-10-16T14:30:18+00:00" > 10/16/26, 14:30 </span>Applied in changeset commit:681bd7220242fb7765c42307c60b35dd2f138946.
I tested this in v12 main branch and can not even get the feature up and running with the provided code snippet. To me it seems this feature is broken (maybe since #93853 – just guessing).
The
templateRootPathsdata will currently only be assigned to the view, when also atemplateNameis set (see: https://github.com/TYPO3/typo3/blob/main/typo3/sysext/frontend/Classes/ContentObject/FluidTemplateContentObject.php#L139).However, when a
templateNameis set and$this->view->getRenderingContext()->setControllerAction($requestControllerActionName);is added after thesetRequest()call insetExtbaseVariables, this seem to work.