From 1c7ce043b95f1c9b1d9e018cc861dd67aebd12c3 Mon Sep 17 00:00:00 2001 From: Sebastian Helzle Date: Mon, 8 Jul 2024 14:14:15 +0200 Subject: [PATCH] BUGFIX: Return correct response set in module controllers Previously the status code set in module actions via `throwStatus` or `response->setStatusCode()` was ignored. With this change the individual module response is merged into the generic module response which then contains the desired status code and other properties. --- Neos.Neos/Classes/Controller/Backend/ModuleController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Neos.Neos/Classes/Controller/Backend/ModuleController.php b/Neos.Neos/Classes/Controller/Backend/ModuleController.php index 612b85d402b..deeb0b5a034 100644 --- a/Neos.Neos/Classes/Controller/Backend/ModuleController.php +++ b/Neos.Neos/Classes/Controller/Backend/ModuleController.php @@ -96,6 +96,7 @@ public function indexAction(array $module) $moduleResponse = new ActionResponse(); $this->dispatcher->dispatch($moduleRequest, $moduleResponse); + $moduleResponse->mergeIntoParentResponse($this->response); if ($moduleResponse->getRedirectUri() !== null) { $this->redirectToUri($moduleResponse->getRedirectUri(), 0, $moduleResponse->getStatusCode());