Problem/Motivation
When browsing around the admin theme, i get the following error
The website encountered an unexpected error. Please try again later.
ArgumentCountError: Too few arguments to function Drupal\components\Template\ComponentsInfo::__construct(), 2 passed in /var/core/www/core/lib/Drupal/Component/DependencyInjection/Container.php on line 273 and exactly 5 expected in Drupal\components\Template\ComponentsInfo->__construct() (line 63 of modules/contrib/components/src/Template/ComponentsInfo.php).
Drupal\components\Template\ComponentsInfo->__construct(Object, Object) (Line: 273)
Drupal\Component\DependencyInjection\Container->createService(Array, 'components.info') (Line: 173)
Drupal\Component\DependencyInjection\Container->get('components.info', 1) (Line: 487)
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) (Line: 237)
Drupal\Component\DependencyInjection\Container->createService(Array, 'components.twig.loader') (Line: 173)
Drupal\Component\DependencyInjection\Container->get('components.twig.loader', 1) (Line: 487)
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) (Line: 326)
Drupal\Component\DependencyInjection\Container->createService(Array, 'private__uIZRZ02rRu8wTd38sm0mEjNnZSnqMv0YOcIInFEr1l4') (Line: 502)
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) (Line: 237)
Drupal\Component\DependencyInjection\Container->createService(Array, 'twig') (Line: 173)
Drupal\Component\DependencyInjection\Container->get('twig') (Line: 158)
Drupal::service('twig') (Line: 56)
twig_render_template('core/themes/classy/templates/form/input.html.twig', Array) (Line: 382)
Drupal\Core\Theme\ThemeManager->render('input', Array) (Line: 431)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 444)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
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: 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: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
I believe that this is a result of the linked parent issue as that has the code which the error is pointing at.
3165589: Incorrect theme loaded when critical_css module is installed
Refreshing the page when the error appears takes you to the desired page but it's still not great to have the site constantly crashing.
The site where this occurring is on: 8.8.12
Comments
Comment #2
lincoln-batsirayi commentedComment #3
lincoln-batsirayi commentedComment #4
johnalbinDid you run the
/update.phppage after updating the components module?If you haven't run
/update.php, then you will see Components module-related updates listed on that page. If you don't run those updates, Drupal will generate theArgumentCountError: Too few arguments to function Drupal\components\Template\ComponentsInfo::__construct(), 2 passederror when it tries to load the cached definition of the Components module's services.Comment #5
johnalbinI'm going to assume running /update.php was the solution.