Project

General

Profile

Actions

Bug #79593

closed

Forward and Redirect are not working in Fluid WidgetController

Added by Dominique Kreemers over 7 years ago. Updated about 7 years ago.

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


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #69863: Use new standalone Fluid as composer dependencyClosedClaus Due2015-09-16

Actions
Actions #1

Updated by Riccardo De Contardi about 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

Also available in: Atom PDF