- Issue created by @n1k
- First commit to issue fork.
Automatically closed - issue fixed for 2 weeks with no activity.
There is a fatal for me using this module.
Create a sitemap and visit the sitemap.xml
getPrefix expects the SiteInterface as a first argument.
public function getPrefix(SiteInterface $site, ?string $langcode = NULL): string
It seems like the prefix is being passed here directly.
\Drupal::service('sites_path_prefix.service')->getPrefix($site->getSetting('prefix'))
Which leads to this error:
TypeError: Drupal\sites_path_prefix\SitesPathPrefixService::getPrefix(): Argument #1 ($site) must be of type Drupal\sites\Plugin\Site\SiteInterface, null given, called in /var/www/html/web/modules/contrib/sites_simple_sitemap/src/Manager/GeneratorDecorator.php on line 91 in Drupal\sites_path_prefix\SitesPathPrefixService->getPrefix() (line 47 of modules/contrib/sites/modules/sites_path_prefix/src/SitesPathPrefixService.php).
Drupal\sites_simple_sitemap\Manager\GeneratorDecorator->getContent(NULL) (Line: 54)
Drupal\simple_sitemap\Controller\SimpleSitemapController->getSitemap(Object, 'default') (Line: 18)
So we should pass in the site instead of the prefix.
Active
1.0
Code
Automatically closed - issue fixed for 2 weeks with no activity.