From f43bf7319d56e59fef104905cfef3bec90b1c425 Mon Sep 17 00:00:00 2001 From: Thomas Hohn Date: Tue, 24 Sep 2024 11:21:58 +0200 Subject: [PATCH] [BUGFIX] Wrap loading of seo functionality in isLoaded clause --- ext_localconf.php | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/ext_localconf.php b/ext_localconf.php index 407b0d7c..18f96c63 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -79,27 +79,29 @@ static function () { ]; } - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['TYPO3\CMS\Frontend\Page\PageGenerator']['generateMetaTags']['canonical'] = - CanonicalGenerator::class . '->handle'; + if (ExtensionManagementUtility::isLoaded('seo')) { + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['TYPO3\CMS\Frontend\Page\PageGenerator']['generateMetaTags']['canonical'] = + CanonicalGenerator::class . '->handle'; - $metaTagManagerRegistry = GeneralUtility::makeInstance(MetaTagManagerRegistry::class); - $metaTagManagerRegistry->registerManager( - 'html5', - Html5MetaTagManager::class - ); - $metaTagManagerRegistry->registerManager( - 'edge', - EdgeMetaTagManager::class - ); - $metaTagManagerRegistry->registerManager( - 'opengraph', - OpenGraphMetaTagManager::class - ); - $metaTagManagerRegistry->registerManager( - 'twitter', - TwitterCardMetaTagManager::class - ); - unset($metaTagManagerRegistry); + $metaTagManagerRegistry = GeneralUtility::makeInstance(MetaTagManagerRegistry::class); + $metaTagManagerRegistry->registerManager( + 'html5', + Html5MetaTagManager::class + ); + $metaTagManagerRegistry->registerManager( + 'edge', + EdgeMetaTagManager::class + ); + $metaTagManagerRegistry->registerManager( + 'opengraph', + OpenGraphMetaTagManager::class + ); + $metaTagManagerRegistry->registerManager( + 'twitter', + TwitterCardMetaTagManager::class + ); + unset($metaTagManagerRegistry); + } $rendererRegistry = GeneralUtility::makeInstance(RendererRegistry::class); $rendererRegistry->registerRendererClass(YouTubeRenderer::class);