Prerequisites
Describe the bug and add attachments
When generating the sitemap, gsitemap throws a PrestaShopException when encountering module routes that require mandatory parameters.
Expected behavior
The sitemap should be generated successfully, ignoring routes that require mandatory parameters (as they cannot be included in a sitemap without specific values).
Actual behavior:
A PrestaShopException is thrown:
Dispatcher::createUrl() miss required parameter "id_search" for route "module-pm_advancedsearch-searchresults"at line 998 in file classes/Dispatcher.php
Error stack trace:
DispatcherCore->createUrl - [line 1161 - classes/Link.php]LinkCore->getPageLink - [line 403 - modules/gsitemap/gsitemap.php]Gsitemap->getMetaLink - [line 755 - modules/gsitemap/gsitemap.php]Gsitemap->createSitemap - [line 208 - modules/gsitemap/gsitemap.php]
Steps to reproduce
- Install a module that defines routes with required parameters (e.g., pm_advancedsearch with route module-pm_advancedsearch-searchresults requiring id_search)
- Go to gsitemap configuration
- Uncheck some meta pages to include them in the sitemap
- Click "Generate sitemap"
PrestaShop version(s) where the bug happened
5.0.0
PHP version(s) where the bug happened
8.2.1
Your company or customer's name goes here (if applicable).
No response
Prerequisites
Describe the bug and add attachments
When generating the sitemap, gsitemap throws a PrestaShopException when encountering module routes that require mandatory parameters.
Expected behavior
The sitemap should be generated successfully, ignoring routes that require mandatory parameters (as they cannot be included in a sitemap without specific values).
Actual behavior:
A PrestaShopException is thrown:
Dispatcher::createUrl() miss required parameter "id_search" for route "module-pm_advancedsearch-searchresults"at line 998 in file classes/Dispatcher.php
Error stack trace:
DispatcherCore->createUrl - [line 1161 - classes/Link.php]LinkCore->getPageLink - [line 403 - modules/gsitemap/gsitemap.php]Gsitemap->getMetaLink - [line 755 - modules/gsitemap/gsitemap.php]Gsitemap->createSitemap - [line 208 - modules/gsitemap/gsitemap.php]
Steps to reproduce
PrestaShop version(s) where the bug happened
5.0.0
PHP version(s) where the bug happened
8.2.1
Your company or customer's name goes here (if applicable).
No response