Bug #100671
openResponses returned from initializeAction methods are not processed
0%
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?