Problem/Motivation

PHP error thrown:

ArgumentCountError: Too few arguments to function Drupal\Core\Form\ConfigFormBase::__construct(), 1 passed in /.../contrib/gmail/src/Form/GmailConfigForm.php on line 82 and exactly 2 expected in Drupal\Core\Form\ConfigFormBase->__construct() (line 45 of core/lib/Drupal/Core/Form/ConfigFormBase.php).
Drupal\gmail\Form\GmailConfigForm->__construct() (Line: 89)
Drupal\gmail\Form\GmailConfigForm::create() (Line: 36)
Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition() (Line: 48)
Drupal\Core\Controller\HtmlFormController->getFormObject() (Line: 58)
Drupal\Core\Controller\FormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 638)
Drupal\Core\Render\Renderer::Drupal\Core\Render\{closure}()
Fiber->start() (Line: 639)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 183)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 30)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 61)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 54)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 753)
Drupal\Core\DrupalKernel->handle() (Line: 34)
Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run() (Line: 32)
require('/app/viv4-root/vendor/autoload_runtime.php') (Line: 22)
require_once('/app/public_html/vc/autoload_runtime.php') (Line: 13)

Steps to reproduce

  1. Install gmail.
  2. Upgrade to Drupal 11.
  3. Navigate to admin/config/system/gmail

Proposed resolution

This root cause seems to match other issues such as Issue 3473652.

Apologies, I am not a Drupal PHP expert or coder, but the attached patch seems to resolve the issue for me locally.

CommentFileSizeAuthor
temp.patch2 KBcrispycpeters

Comments

crispycpeters created an issue. See original summary.

avpaderno’s picture

Version: 1.0.4 » 1.0.x-dev
avpaderno’s picture

Status: Active » Needs work
Issue tags: +Needs merge request

Since patches are not longer tested, a merge request is necessary.