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)

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

jjgw created an issue. See original summary.

Mykhailo.Levchenko’s picture

I have the same issue

ravi kant’s picture

Status: Active » Needs review

The issue is solving with development version.
composer require 'drupal/xmlsitemap:1.x-dev@dev'

Indrapatil’s picture

I installed this "composer require 'drupal/xmlsitemap:^1.4'"
It's working for me.

ravi kant’s picture

@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?

Indrapatil’s picture

@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."

ravi kant’s picture

@Indrapatil
Now check with dev version as commented on #3

Indrapatil’s picture

@ravi kant Its working #3 for me.

rcaldeiradev’s picture

In 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.

ravi kant’s picture

I 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.

Dave Reid’s picture

I will get a new release out Monday all, I'm sorry this was fixed but not released!

Rushikesh Raval’s picture

@Dave Reid Thanks for 8.x1.5 release. I think this issue should be marked as Fixed.