From e2e67d02b03a29bc413bb04a823fbb73550d84c8 Mon Sep 17 00:00:00 2001 From: Rune Piper Date: Tue, 14 Jan 2025 11:28:39 +0100 Subject: [PATCH] chore: improve compatibility with TYPO3 v13 --- Classes/Service/SearchService.php | 4 ++-- composer.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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" },