diff --git a/Classes/Service/SearchService.php b/Classes/Service/SearchService.php index 53128e3..58f78fd 100644 --- a/Classes/Service/SearchService.php +++ b/Classes/Service/SearchService.php @@ -45,8 +45,8 @@ public function search(string $query, string $sorting = 'crdate_desc', array $ty ], // Filter by checking the rootPageId is in the rootline 'filter' => [ - 'rootPageId = ' . $GLOBALS['TSFE']->getSite()->getRootPageId(), - 'languageId IN [-1,' . $GLOBALS['TSFE']->getLanguage()->getLanguageId() . ']', + 'rootPageId = ' . $GLOBALS['TYPO3_REQUEST']->getAttribute('site')->getRootPageId(), + 'languageId IN [-1,' . $GLOBALS['TYPO3_REQUEST']->getAttribute('language')->getLanguageId() . ']', $typesFilter, ], ]); diff --git a/composer.json b/composer.json index 913f55c..f7e72d0 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "Extension to use Meilisearch as search.", "type": "typo3-cms-extension", "require": { - "typo3/cms-core": "^10.4 || ^11.5 || ^12.4 || ^13.4", + "typo3/cms-core": "^11.5 || ^12.4 || ^13.4", "meilisearch/meilisearch-php": "^1.6", "spatie/pdf-to-text": "^1.52.1" },