Actions
Bug #79593
closedForward and Redirect are not working in Fluid WidgetController
Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2017-02-02
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
extbase, fluid
Complexity:
hard
Is Regression:
Yes
Sprint Focus:
Description
If i do a $this->forward('success'); the Extbase Dispatcher class is trying to load a wrong classname
In2code\ExtensionName\ViewHelpers\Widget\Controller\ViewHelpers\Widget\AppointmentListController
I think the problem is in the following codeblock in typo3/sysext/fluid/Classes/Core/Rendering/RenderingContext.php
// Check if Request is using a sub-package key; in which case we translate this // for our RenderingContext as an emulated plain old sub-namespace controller. $controllerName = $request->getControllerName(); if ($request->getControllerSubpackageKey() && !strpos($controllerName, '\\')) { $this->setControllerName($request->getControllerSubpackageKey() . '\\' . $controllerName); } else { $this->setControllerName($controllerName); }
this overrides the controller name of the rendering context and the controller name of the request as well, which leads to the last part of the namespace …\ViewHelpers\Widget\AppointmentListController.
If i remove the if/else and just call $this->setControllerName($controllerName); the namespace is correct, but the template files can not be found because fluid is checking for
Resources/Private/Templates/AppointmentList/Success.htmlinstead of
Resources/Private/Templates/ViewHelpers/Widget/AppointmentList/Success.html
Updated by Riccardo De Contardi over 7 years ago
- Status changed from New to Closed
By design, redirect() and forward() must be used for outermost, request-processing controllers only, therefore I close this issue.
If you think that this is the wrong decision then please reopen it or open a new issue with a reference to this one. Thank you.
Actions