ArgumentCountError: Too few arguments to function

Created on 28 December 2021, almost 3 years ago
Updated 11 December 2024, 11 days ago

Problem/Motivation

Getting the below error on /admin/config/services/mailchimp/ecommerce after updating to the 2.x dev module, so I can't configure the module.

ArgumentCountError: Too few arguments to function Drupal\mailchimp_ecommerce\Form\MailchimpEcommerceAdminSettings::__construct(), 2 passed in /var/www/html/web/modules/contrib/mailchimp_ecommerce/modules/mailchimp_ecommerce_commerce/src/Form/MailchimpEcommerceCommerceAdminSettings.php on line 39 and exactly 4 expected in Drupal\mailchimp_ecommerce\Form\MailchimpEcommerceAdminSettings->__construct() (line 50 of /var/www/html/web/modules/contrib/mailchimp_ecommerce/src/Form/MailchimpEcommerceAdminSettings.php)
#0 /var/www/html/web/modules/contrib/mailchimp_ecommerce/modules/mailchimp_ecommerce_commerce/src/Form/MailchimpEcommerceCommerceAdminSettings.php(39): Drupal\mailchimp_ecommerce\Form\MailchimpEcommerceAdminSettings->__construct(Object(Drupal\Core\Config\ConfigFactory), Object(Drupal\mailchimp_ecommerce\StoreHandler))
#1 /var/www/html/web/modules/contrib/mailchimp_ecommerce/modules/mailchimp_ecommerce_commerce/src/Form/MailchimpEcommerceCommerceAdminSettings.php(53): Drupal\mailchimp_ecommerce_commerce\Form\MailchimpEcommerceCommerceAdminSettings->__construct(Object(Drupal\Core\Config\ConfigFactory), Object(Drupal\commerce_store\CurrentStore), Object(Drupal\mailchimp_ecommerce\StoreHandler))
#2 /var/www/html/web/core/lib/Drupal/Core/DependencyInjection/ClassResolver.php(28): Drupal\mailchimp_ecommerce_commerce\Form\MailchimpEcommerceCommerceAdminSettings::create(Object(Drupal\Core\DependencyInjection\Container))
#3 /var/www/html/web/core/lib/Drupal/Core/Controller/HtmlFormController.php(48): Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition('\\Drupal\\mailchi...')
#4 /var/www/html/web/core/lib/Drupal/Core/Controller/FormController.php(58): Drupal\Core\Controller\HtmlFormController->getFormObject(Object(Drupal\Core\Routing\RouteMatch), '\\Drupal\\mailchi...')
#5 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch))
#6 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#7 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(564): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#8 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#9 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#10 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(158): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#11 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(80): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#12 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#13 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#14 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#15 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#16 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#17 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#18 /var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#19 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(708): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#20 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#21 {main}
.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡©πŸ‡°Denmark kristofferrom

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024