Project

General

Profile

Actions

Bug #100671

open

Responses returned from initializeAction methods are not processed

Added by Andreas Nedbal over 1 year ago. Updated over 1 year ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2023-04-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

While upgrading Powermail to version 12 we noticed that forwarding inside an initializeAction method does not work (anymore).

With TYPO3 11 (and now required in 12) actions require a ResponseInterface to be returned. Now if we want to forward/redirect ahead of an action, for guarding purposes, we thought that returning a Response inside initialize{action}Action would yield that result.

It doesn't, and so we don't have a way to respond differently ahead of an action being called. Or at least, as simple as it was before.

We need this functionality because we are validating that arguments are sent against the correct form, but due to ActionController not stopping to process a request when any Response has been returned from an initializeAction method, it continues on with the actual action, causing validation errors and other wrong behaviour.

Is this a bug, or what is the best approach in version 12 to forward before an action is being called?

Actions

Also available in: Atom PDF