Skip to content

Commit

Permalink
[BUGFIX] Fix crash in BE context (#705)
Browse files Browse the repository at this point in the history
  • Loading branch information
twoldanski authored Feb 7, 2024
1 parent 0a2efb4 commit b4d6021
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Classes/Event/Listener/AfterLinkIsGeneratedListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ public function __invoke(AfterLinkIsGeneratedEvent $event): void
$site = $event->getContentObjectRenderer()->getRequest()->getAttribute('site');
$key = 'frontendBase';

if (is_string($pageId) && str_starts_with($pageId, 't3://page?uid=current&type=' . $site->getSettings()->get('headless.sitemap.type', '1533906435'))) {
$key = $site->getSettings()->get('headless.sitemap.key', 'frontendApiProxy');
}

if (!$site instanceof NullSite) {
if (is_string($pageId) && str_starts_with($pageId, 't3://page?uid=current&type=' . $site->getSettings()->get('headless.sitemap.type', '1533906435'))) {
$key = $site->getSettings()->get('headless.sitemap.key', 'frontendApiProxy');
}

$href = $urlUtility->getFrontendUrlWithSite($event->getLinkResult()->getUrl(), $site, $key);
}
}
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'author_email' => '[email protected]',
'author_company' => 'Macopedia Sp. z o.o.',
'category' => 'fe',
'version' => '4.2.6',
'version' => '4.2.7',
'constraints' => [
'depends' => [
'frontend' => '12.4.3-12.5.99',
Expand Down

0 comments on commit b4d6021

Please sign in to comment.