From 9182a693023fbd3370e0fb98bb12ebbff696a24d Mon Sep 17 00:00:00 2001 From: CarlosAgrelis <22834317+CarlosAgrelis@users.noreply.github.com> Date: Wed, 4 Sep 2019 16:43:13 +0200 Subject: [PATCH 1/3] Removing realurl config for TYPO3 version 9 --- Classes/Helper.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Classes/Helper.php b/Classes/Helper.php index df31048..55261b8 100644 --- a/Classes/Helper.php +++ b/Classes/Helper.php @@ -45,13 +45,9 @@ class Helper $currentPageId = $targetPageId = $tsFeController->id; - // Get the rootpage_id from realurl config. - $realurlConfig = $tsFeController->TYPO3_CONF_VARS['EXTCONF']['realurl']; - if (is_array($realurlConfig) && array_key_exists($_SERVER['SERVER_NAME'], $realurlConfig)) { - $rootpage_id = $realurlConfig[$_SERVER['SERVER_NAME']]['pagePath']['rootpage_id']; - } else { - $rootpage_id = $realurlConfig['_DEFAULT']['pagePath']['rootpage_id']; - } + // Get the rootpage_id + $pageRepository = GeneralUtility::makeInstance(PageRepository::class); + $rootpage_id = array_pop($pageRepository->getRootLine($GLOBALS['TSFE']->id)); // If the ID is NULL, then we set this value to the rootpage_id. NULL is the "Home"page, ID is a specific sub-page, e.g. www.domain.de (NULL) - www.domain.de/page.html (ID) if (!$currentPageId) { @@ -63,7 +59,6 @@ class Helper } } - $pageRepository = GeneralUtility::makeInstance(PageRepository::class); $currentPagePropertiesArray = $pageRepository->getPage($currentPageId); $pageBPageId = $currentPagePropertiesArray['tx_abtest2_b_id']; From 534cb9e32cd3ad074ae762f20465aa4845d0f204 Mon Sep 17 00:00:00 2001 From: CarlosAgrelis <22834317+CarlosAgrelis@users.noreply.github.com> Date: Wed, 4 Sep 2019 16:47:02 +0200 Subject: [PATCH 2/3] Update ext_emconf.php --- ext_emconf.php | 1 - 1 file changed, 1 deletion(-) diff --git a/ext_emconf.php b/ext_emconf.php index b16c900..c94509e 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -27,7 +27,6 @@ $EM_CONF[$_EXTKEY] = [ 'depends' => [ 'typo3' => '7.6.0-8.7.99', - 'realurl' => '2.0.0-0.0.0', ], 'conflicts' => [], From b7b473b78836f7f641228c0b809441a4dfd2f259 Mon Sep 17 00:00:00 2001 From: CarlosAgrelis <22834317+CarlosAgrelis@users.noreply.github.com> Date: Wed, 4 Sep 2019 16:47:15 +0200 Subject: [PATCH 3/3] Update ext_emconf.php --- ext_emconf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext_emconf.php b/ext_emconf.php index c94509e..974e855 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -26,7 +26,7 @@ $EM_CONF[$_EXTKEY] = [ [ 'depends' => [ - 'typo3' => '7.6.0-8.7.99', + 'typo3' => '7.6.0-9.5.99', ], 'conflicts' => [],