Problem/Motivation

When I tried to resend an invitation by mail, I got the following fatal error:

The website encountered an unexpected error. Please try again later.
ArgumentCountError: Too few arguments to function Drupal\invite_by_email\Plugin\Invite\InviteByEmail::__construct(), 4 passed in /var/www/project/web/modules/contrib/invite/src/Form/InviteResendForm.php on line 103 and exactly 6 expected in Drupal\invite_by_email\Plugin\Invite\InviteByEmail->__construct() (line 73 of modules/contrib/invite/modules/invite_by_email/src/Plugin/Invite/InviteByEmail.php).

Drupal\invite_by_email\Plugin\Invite\InviteByEmail->__construct() (Line: 103)
Drupal\invite\Form\InviteResendForm->submitForm()
call_user_func_array() (Line: 114)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers() (Line: 52)
Drupal\Core\Form\FormSubmitter->doSubmitForm() (Line: 592)
Drupal\Core\Form\FormBuilder->processForm() (Line: 320)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 564)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 52)
Drupal\other_module\StackMiddleware\RegisterDatalayerBag->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 23)
Stack\StackedHttpKernel->handle() (Line: 709)
Drupal\Core\DrupalKernel->handle() (Line: 19)

Steps to reproduce

Go to Settings > People > Invite > Invite List(/invite/list), Then try to resned any inviatation.

Issue fork invite-3298623

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

abdhomsi created an issue. See original summary.

abdhomsi’s picture

Status: Active » Needs review
anprok’s picture

Status: Needs review » Reviewed & tested by the community

I got this error on my site with invite module installed, and this fix helped me. I think it can be merged to 2.x branch without any problem.