When I updated module to 8.x-1.02 version, I got this error:

The website encountered an unexpected error. Please try again later.
TypeError: Argument 3 passed to Drupal\something_went_wrong\EventSubscriber\SomethingWentWrongExceptionSubscriber::__construct() must be an instance of Drupal\Core\Logger\LoggerChannelFactory, instance of Drupal\redirect_404\Render\Redirect404LogSuppressor given, called in /home/studiopresent/domains/limited.studiopresent.work/public_html/core/lib/Drupal/Component/DependencyInjection/Container.php on line 281 in Drupal\something_went_wrong\EventSubscriber\SomethingWentWrongExceptionSubscriber->__construct() (line 68 of modules/contrib/something_went_wrong/src/EventSubscriber/SomethingWentWrongExceptionSubscriber.php).

Drupal\something_went_wrong\EventSubscriber\SomethingWentWrongExceptionSubscriber->__construct(Object, Object, Object, Object) (Line: 281)
Drupal\Component\DependencyInjection\Container->createService(Array, 'something_went_wrong.exception.subscriber') (Line: 173)
Drupal\Component\DependencyInjection\Container->get('something_went_wrong.exception.subscriber') (Line: 105)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.exception', Object) (Line: 228)
Symfony\Component\HttpKernel\HttpKernel->handleException(Object, Object, 1) (Line: 79)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 693)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Comments

bojan.m created an issue. See original summary.

corn696’s picture

Did you clear the cache?

I have tested this on a clean install. After updating to 1.2 i got the error on a 404 Page. After clearing the Cache no more error.

gnikolovski’s picture

  • gnikolovski committed bc4289e on 8.x-1.x
    Issue #3052389 by gnikolovski: Argument 3 passed to...
gnikolovski’s picture

Version: 8.x-1.02 » 8.x-1.x-dev
Status: Active » Fixed

This happens because other modules, such as Redirect 404 in your case, may implement their own LoggerChannelFactory and override core's. Using LoggerChannelFactoryInterface instead of LoggerChannelFactory will fix this!

Status: Fixed » Closed (fixed)

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

vaibhavy72-aipl’s picture

TypeError: Argument 3 passed to Drupal\aster_base\EventSubscriber\WorkflowTransitionMainSubscriber::__construct() must be an instance of Drupal\Core\Logger\LoggerChannelFactory, instance of Drupal\redirect_404\Render\Redirect404LogSuppressor given

same error while updating contents, drupal 9. cache cleared but not working