Skip to content

Commit

Permalink
[BUGFIX] Wrap loading of seo functionality in isLoaded clause
Browse files Browse the repository at this point in the history
  • Loading branch information
thomashohn committed Sep 24, 2024
1 parent 9dfec77 commit f43bf73
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f43bf73

Please sign in to comment.