Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion gsitemap.php
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,15 @@ protected function getMetaLink(&$link_sitemap, $lang, &$index, &$i, $id_meta = 0

$url = '';
if (!in_array($meta['id_meta'], explode(',', Configuration::get('GSITEMAP_DISABLE_LINKS')))) {
$url = $link->getPageLink($meta['page'], null, $lang['id_lang']);
try {
$url = $link->getPageLink($meta['page'], null, $lang['id_lang']);
} catch (PrestaShopException $e) {
// Some meta pages map to routes that require mandatory parameters
// (e.g. a module search route needing an id). Such routes cannot be
// represented in a sitemap without a specific value, so we skip them
// instead of aborting the whole sitemap generation.
continue;
}

if (!$this->addLinkToSitemap($link_sitemap, [
'type' => 'meta',
Expand Down