From 5a99f911faabac94771904f032dd18d028390539 Mon Sep 17 00:00:00 2001 From: Tim Weisenberger Date: Tue, 22 Oct 2024 12:03:26 +0200 Subject: [PATCH] fix: Ensure backend module is loadable when no page from the page tree is selected --- Classes/Controller/ModuleController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Classes/Controller/ModuleController.php b/Classes/Controller/ModuleController.php index ecf94d4..f1866dd 100644 --- a/Classes/Controller/ModuleController.php +++ b/Classes/Controller/ModuleController.php @@ -79,8 +79,10 @@ protected function getModuleTemplateResponse(): ResponseInterface return $this->htmlResponse($this->moduleTemplate->renderContent()); } - public function indexAction(int $id): ResponseInterface + public function indexAction(): ResponseInterface { + $id = (int) ($this->request->getQueryParams()['id'] ?? 0); + if (!$this->settings['enabled']) { return $this->forwardToErrorWithCannedMessage('disabled'); }