From 6120e63a3fdf25ce413358ee10e4f6570844cd30 Mon Sep 17 00:00:00 2001 From: Markus Hofmann Date: Fri, 26 May 2023 10:46:22 +0200 Subject: [PATCH] [BUGFIX] Auto detection glossary Until TYPO3 v10, the page ID in requests is given as `pageId` instead of `id`. This bugfix respects the given request and detects correct page ID in DeeplBackendUtility for determining glossary. Backport to v4 not necessary, as since TYPO3 v11 the ID is given as `id` --- Classes/Utility/DeeplBackendUtility.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/Utility/DeeplBackendUtility.php b/Classes/Utility/DeeplBackendUtility.php index 5483142f..d311800f 100644 --- a/Classes/Utility/DeeplBackendUtility.php +++ b/Classes/Utility/DeeplBackendUtility.php @@ -343,8 +343,8 @@ public static function detectCurrentPage(): array self::$currentPage = []; $request = $GLOBALS['TYPO3_REQUEST']; $queryParams = $request ? $request->getQueryParams() : []; - if (isset($queryParams['id'])) { - $currentId = (int)$queryParams['id']; + if (isset($queryParams['id']) || isset($queryParams['pageId'])) { + $currentId = (int)($queryParams['id'] ?? $queryParams['pageId']); return self::getPageRecord($currentId); } if (isset($queryParams['cmd'])) {