diff --git a/Classes/Controller/PostController.php b/Classes/Controller/PostController.php index 0f3d41d3..b7782943 100644 --- a/Classes/Controller/PostController.php +++ b/Classes/Controller/PostController.php @@ -101,7 +101,7 @@ protected function initializeView($view): void $this->view->assign('feed', $feedData); } - $contentObject = $this->configurationManager->getContentObject(); + $contentObject = $this->request->getAttribute('currentContentObject'); $this->view->assign('data', $contentObject !== null ? $contentObject->data : null); } @@ -185,7 +185,7 @@ public function listPostsByDateAction(?int $year = null, ?int $month = null, int public function listPostsByCategoryAction(?Category $category = null, int $currentPage = 1): ResponseInterface { if ($category === null) { - $contentObject = $this->configurationManager->getContentObject(); + $contentObject = $this->request->getAttribute('currentContentObject'); $referenceUid = $contentObject !== null ? (int) $contentObject->data['uid'] : null; if ($referenceUid !== null) { $categories = $this->categoryRepository->getByReference('tt_content', $referenceUid);