Issue Bug Closed

#79593Forward and Redirect are not working in Fluid WidgetController

Dominique Kreemers 02/02/17, 08:58 updated 04/04/17, 00:47

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.html
Resources/Private/Templates/ViewHelpers/Widget/AppointmentList/Success.html

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.