diff --git a/Classes/Controller/SruController.php b/Classes/Controller/SruController.php index adfb558c..971db1db 100644 --- a/Classes/Controller/SruController.php +++ b/Classes/Controller/SruController.php @@ -22,7 +22,7 @@ class SruController extends AbstractController { /** * The main method of the controller - * + * @xglobal $GLOBALS * @return ResponseInterface */ public function mainAction(): ResponseInterface @@ -54,8 +54,10 @@ public function mainAction(): ResponseInterface return $this->htmlResponse(); } + $pageArguments = $this->request->getAttribute('routing'); + $actionUrl = $this->uriBuilder->reset() - ->setTargetPageUid($GLOBALS['TSFE']->id) + ->setTargetPageUid($pageArguments->getPageId()) ->setCreateAbsoluteUri(true) ->build();