ArgumentCountError: Too few arguments to function Drupal\entity_print\EventSubscriber\PrintEngineExceptionSubscriber::__construct()

Created on 30 January 2023, almost 2 years ago

Problem/Motivation

I am using Drupal 9.4.3, and PHP 7.3 version.
I have updated dompdf package from ^1.2.0 to ^2.0.0 and then updated the entity_print module from 2.6.0 to the 2.11 version and ran update.php, I have got the below errors:

https://abc.com/update.php||111||ArgumentCountError: Too few arguments to function Drupal\entity_print\EventSubscriber\PrintEngineExceptionSubscriber::__construct(), 2 passed in /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php on line 262 and exactly 3 expected in Drupal\entity_print\EventSubscriber\PrintEngineExceptionSubscriber->__construct() (line 51 of /var/www/html/docroot/modules/contrib/entity_print/src/EventSubscriber/PrintEngineExceptionSubscriber.php) #0 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(262): Drupal\entity_print\EventSubscriber\PrintEngineExceptionSubscriber->__construct()
#1 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService()
#2 /var/www/html/docroot/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(136): Drupal\Component\DependencyInjection\Container->get()
#3 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(219): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#4 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(91): Symfony\Component\HttpKernel\HttpKernel->handleThrowable()
#5 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#6 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#7 /var/www/html/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#8 /var/www/html/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#9 /var/www/html/docroot/core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle()
#10 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle()
#11 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#12 /var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#13 /var/www/html/docroot/core/lib/Drupal/Core/DrupalKernel.php(709): Stack\StackedHttpKernel->handle()
#14 /var/www/html/docroot/index.php(19): Drupal\Core\DrupalKernel->handle()

When I tried to print the node, https://abc.com/print/pdf/node/14, it throws the below error:

ArgumentCountError: Too few arguments to function Drupal\entity_print\FilenameGenerator::__construct(), 1 passed in /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php on line 262 and exactly 2 expected in Drupal\entity_print\FilenameGenerator->__construct() (line 37 of /var/www/html/docroot/modules/contrib/entity_print/src/FilenameGenerator.php) #0 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(262): Drupal\entity_print\FilenameGenerator->__construct()
#1 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService()
#2 /var/www/html/docroot/modules/contrib/entity_print/src/Renderer/ContentEntityRenderer.php(52): Drupal\Component\DependencyInjection\Container->get()
#3 /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityTypeManager.php(269): Drupal\entity_print\Renderer\ContentEntityRenderer::createInstance()
#4 /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityTypeManager.php(258): Drupal\Core\Entity\EntityTypeManager->createHandlerInstance()
#5 /var/www/html/docroot/modules/contrib/entity_print/src/Renderer/RendererFactory.php(28): Drupal\Core\Entity\EntityTypeManager->getHandler()
#6 /var/www/html/docroot/modules/contrib/entity_print/src/PrintBuilder.php(121): Drupal\entity_print\Renderer\RendererFactory->create()
#7 /var/www/html/docroot/modules/contrib/entity_print/src/PrintBuilder.php(56): Drupal\entity_print\PrintBuilder->prepareRenderer()
#8 /var/www/html/docroot/modules/contrib/entity_print/src/Controller/EntityPrintController.php(91): Drupal\entity_print\PrintBuilder->deliverPrintable()
#9 /var/www/html/vendor/symfony/http-foundation/StreamedResponse.php(112): Drupal\entity_print\Controller\EntityPrintController->Drupal\entity_print\Controller\{closure}()
#10 /var/www/html/vendor/symfony/http-foundation/Response.php(381): Symfony\Component\HttpFoundation\StreamedResponse->sendContent()
#11 /var/www/html/docroot/modules/contrib/entity_print/src/Controller/EntityPrintController.php(92): Symfony\Component\HttpFoundation\Response->send()
#12 [internal function]: Drupal\entity_print\Controller\EntityPrintController->viewPrint()
#13 /var/www/html/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#14 /var/www/html/docroot/core/lib/Drupal/Core/Render/Renderer.php(564): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#15 /var/www/html/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
#16 /var/www/html/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#17 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(158): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#18 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(80): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#19 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#20 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#21 /var/www/html/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#22 /var/www/html/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#23 /var/www/html/docroot/core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle()
#24 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle()
#25 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#26 /var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#27 /var/www/html/docroot/core/lib/Drupal/Core/DrupalKernel.php(709): Stack\StackedHttpKernel->handle()
#28 /var/www/html/docroot/index.php(19): Drupal\Core\DrupalKernel->handle()
#29 {main}

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

💬 Support request
Status

Postponed: needs info

Version

2.11

Component

Code

Created by

🇮🇳India nileema19

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024