In #3434566: Automated Drupal 11 compatibility fixes for simple_sitemap changes have been made to replace watchdog_exception with logging from \Drupal\Core\Utility\Error class. However we already have our own neat class for logging that, if improved upon, would clan up some redundancies.

Comments

gbyte created an issue. See original summary.

  • gbyte committed 7dfe7190 on 4.x
    Issue #3489360 by gbyte: Use sitemap logger for exception logging
    
d.fisher’s picture

I think this commit may have introduced an issue? In the logs I'm seeing:

TypeError: Drupal\simple_sitemap\Logger::__construct(): Argument #1 ($messenger) must be of type Drupal\Core\Messenger\MessengerInterface, Drupal\Core\Logger\LoggerChannel given, called in /Users/[redacted]/sites/[redacted]/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 in Drupal\simple_sitemap\Logger->__construct() (line 35 of /Users/[redacted]/sites/[redacted]/web/modules/contrib/simple_sitemap/src/Logger.php).

Full stack trace:

#0 /Users/[redacted]/sites/[redacted]/web/core/lib/Drupal/Component/DependencyInjection/Container.php(259): Drupal\simple_sitemap\Logger->__construct(Object(Drupal\Core\Logger\LoggerChannel), Object(Drupal\Core\Messenger\Messenger), Object(Drupal\Core\Session\AccountProxy))
#1 /Users/[redacted]/sites/[redacted]/web/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array, 'simple_sitemap....')
#2 /Users/[redacted]/sites/[redacted]/web/core/lib/Drupal/Component/DependencyInjection/Container.php(430): Drupal\Component\DependencyInjection\Container->get('simple_sitemap....', 1)
#3 /Users/[redacted]/sites/[redacted]/web/core/lib/Drupal/Component/DependencyInjection/Container.php(237): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#4 /Users/[redacted]/sites/[redacted]/web/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array, 'simple_sitemap....')
#5 /Users/[redacted]/sites/[redacted]/web/core/lib/Drupal/Component/DependencyInjection/Container.php(430): Drupal\Component\DependencyInjection\Container->get('simple_sitemap....', 1)
#6 /Users/[redacted]/sites/[redacted]/web/core/lib/Drupal/Component/DependencyInjection/Container.php(237): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#7 /Users/[redacted]/sites/[redacted]/web/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array, 'simple_sitemap....')
#8 /Users/[redacted]/sites/[redacted]/web/core/lib/Drupal/Component/DependencyInjection/Container.php(430): Drupal\Component\DependencyInjection\Container->get('simple_sitemap....', 1)
#9 /Users/[redacted]/sites/[redacted]/web/core/lib/Drupal/Component/DependencyInjection/Container.php(273): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#10 /Users/[redacted]/sites/[redacted]/web/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array, 'path_processor_...')
#11 /Users/[redacted]/sites/[redacted]/web/core/lib/Drupal/Component/DependencyInjection/Container.php(430): Drupal\Component\DependencyInjection\Container->get('path_processor_...', 1)
#12 /Users/[redacted]/sites/[redacted]/web/core/lib/Drupal/Component/DependencyInjection/Container.php(237): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#13 /Users/[redacted]/sites/[redacted]/web/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array, 'router.route_pr...')
#14 /Users/[redacted]/sites/[redacted]/web/core/lib/Drupal/Component/DependencyInjection/Container.php(430): Drupal\Component\DependencyInjection\Container->get('router.route_pr...', 1)
#15 /Users/[redacted]/sites/[redacted]/web/core/lib/Drupal/Component/DependencyInjection/Container.php(237): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#16 /Users/[redacted]/sites/[redacted]/web/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array, 'options_request...')
#17 /Users/[redacted]/sites/[redacted]/web/core/lib/Drupal/Component/DependencyInjection/Container.php(454): Drupal\Component\DependencyInjection\Container->get('options_request...', 1)
#18 /Users/[redacted]/sites/[redacted]/vendor/symfony/event-dispatcher/EventDispatcher.php(243): Drupal\Component\DependencyInjection\Container->Drupal\Component\DependencyInjection\{closure}()
#19 /Users/[redacted]/sites/[redacted]/vendor/symfony/event-dispatcher/EventDispatcher.php(206): Symfony\Component\EventDispatcher\EventDispatcher::Symfony\Component\EventDispatcher\{closure}(Object(Symfony\Component\HttpKernel\Event\RequestEvent), 'kernel.request', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#20 /Users/[redacted]/sites/[redacted]/vendor/symfony/event-dispatcher/EventDispatcher.php(56): Symfony\Component\EventDispatcher\EventDispatcher->callListeners(Array, 'kernel.request', Object(Symfony\Component\HttpKernel\Event\RequestEvent))
#21 /Users/[redacted]/sites/[redacted]/vendor/symfony/http-kernel/HttpKernel.php(159): Symfony\Component\EventDispatcher\EventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\RequestEvent), 'kernel.request')
#22 /Users/[redacted]/sites/[redacted]/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#23 /Users/[redacted]/sites/[redacted]/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#24 /Users/[redacted]/sites/[redacted]/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 /Users/[redacted]/sites/[redacted]/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#26 /Users/[redacted]/sites/[redacted]/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#27 /Users/[redacted]/sites/[redacted]/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(116): Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#28 /Users/[redacted]/sites/[redacted]/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(90): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#29 /Users/[redacted]/sites/[redacted]/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#30 /Users/[redacted]/sites/[redacted]/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#31 /Users/[redacted]/sites/[redacted]/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(53): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#32 /Users/[redacted]/sites/[redacted]/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#33 /Users/[redacted]/sites/[redacted]/web/core/lib/Drupal/Core/DrupalKernel.php(715): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#34 /Users/[redacted]/sites/[redacted]/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#35 {main}
gbyte’s picture

Strange, did you clear the cache after updating the module?

gbyte’s picture

Assigned: gbyte » Unassigned
gbyte’s picture

Status: Active » Fixed

This here issue is fixed; for your error see #3560114: Error on update.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

gbyte’s picture

Related issues: +#3560114: Error on update

Status: Fixed » Closed (fixed)
Related issues: -#3434566: Automated Drupal 11 compatibility fixes for simple_sitemap

Automatically closed - issue fixed for 2 weeks with no activity.