Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
When trying to configure xmlsitemap a Call to undefined method in function xmlsitemap_check_status() error message is given.
Steps to reproduce
Using Drupal 10.1.1 / PHP 8.2.8 / MYSQL 8.0.33
Install xmlsitemap with composer
Activate xmlsitemap
Configuring xmlsitemap gives following error message:
The website encountered an unexpected error. Please try again later.
Error: Call to undefined method Drupal\Core\Extension\ModuleHandler::getImplementations() in xmlsitemap_check_status() (line 2351 of modules/contrib/xmlsitemap/xmlsitemap.module).
Drupal\xmlsitemap\XmlSitemapListBuilder->render() (Line: 23)
Drupal\Core\Entity\Controller\EntityListController->listing()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 583)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 166)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 74)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704)
Drupal\Core\DrupalKernel->handle() (Line: 19)
Comments
Comment #2
Mykhailo.Levchenko CreditAttribution: Mykhailo.Levchenko at ZANZARRA Drupal Agency commentedI have the same issue
Comment #3
ravi kant CreditAttribution: ravi kant at Specbee commentedThe issue is solving with development version.
composer require 'drupal/xmlsitemap:1.x-dev@dev'
Comment #4
Indrapatil CreditAttribution: Indrapatil at Valuebound for Valuebound commentedI installed this "composer require 'drupal/xmlsitemap:^1.4'"
It's working for me.
Comment #5
ravi kant CreditAttribution: ravi kant at Specbee commented@Indrapatil
The issue was in Drupal-10 only.
It is working as designed in Drupal-9.
Can you confirm which Drupal version you have tested?
Comment #6
Indrapatil CreditAttribution: Indrapatil at Valuebound for Valuebound commented@ravi kant
My mistake I checked in Drupal 9. Now I tested for Drupal 10 getting the same error.
" The website encountered an unexpected error. Please try again later."
Comment #7
ravi kant CreditAttribution: ravi kant at Specbee commented@Indrapatil
Now check with dev version as commented on #3
Comment #8
Indrapatil CreditAttribution: Indrapatil at Valuebound for Valuebound commented@ravi kant Its working #3 for me.
Comment #9
rcaldeiradev CreditAttribution: rcaldeiradev commentedIn case you don't want to use a Dev version, you can apply this patch on 8.x-1.4. It worked fine on my end.
Comment #10
ravi kant CreditAttribution: ravi kant at Specbee commentedI tried the patch as suggested by @rcaldeiradev. It working as accepted.
But I would like to use the dev version module because we need to manage the patch from composer which need extra effort and if we will use the dev version then it can easily upgrade with a new release that will having dev version changes also.
Comment #11
Dave ReidI will get a new release out Monday all, I'm sorry this was fixed but not released!
Comment #12
Rushikesh Raval CreditAttribution: Rushikesh Raval commented@Dave Reid Thanks for 8.x1.5 release. I think this issue should be marked as Fixed.