Skip to content

Commit

Permalink
[BUGFIX] Wrap loading of seo functionality in isLoaded clause (TYPO3-…
Browse files Browse the repository at this point in the history
  • Loading branch information
thomashohn authored Sep 26, 2024
1 parent 9dfec77 commit f77d15f
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 f77d15f

Please sign in to comment.