Too few arguments to function captcha

Created on 19 September 2022, over 2 years ago
Updated 20 June 2023, over 1 year ago

Problem/Motivation

Causes display of "this website has encountered an error" , blank page
The following message in issues report (details ommitted)

ArgumentCountError : Too few arguments to function Drupal\captcha\Service\CaptchaService::__construct(), 0 passed in public_html/core/lib/Drupal/Component/DependencyInjection/Container.php on line 262 and exactly 1 expected dans Drupal\captcha\Service\CaptchaService->__construct() (/....... public_html/modules/captcha/src/Service/CaptchaService.php ligne 28

Steps to reproduce

Install captcha update on Drupal 9.4.5

Proposed resolution

Rétrograde to former captcha version

Remaining tasks

Add missing arguments to function

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Closed: cannot reproduce

Version

1.5

Component

Code

Created by

🇫🇷France onewomanbiz

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.

  • 🇦🇺Australia taggartj

    Strangest thing using 8.x-1.10
    2 environments same code base:

    one php 8.0.28 (does error) vs other has 8.0.29 (does not error)

    
    ArgumentCountError: Too few arguments to function Drupal\captcha\Service\CaptchaService::__construct(), 0 passed in /var/www/html/public/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 and exactly 1 expected in Drupal\captcha\Service\CaptchaService->__construct() (line 28 of /var/www/html/public/modules/contrib/captcha/src/Service/CaptchaService.php)
    #0 /var/www/html/public/core/lib/Drupal/Component/DependencyInjection/Container.php(259): Drupal\captcha\Service\CaptchaService->__construct()
    #1 /var/www/html/public/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array, 'captcha.helper')
    #2 /var/www/html/public/core/lib/Drupal.php(207): Drupal\Component\DependencyInjection\Container->get('captcha.helper')
    #3 /var/www/html/public/modules/contrib/captcha/captcha.module(169): Drupal::service('captcha.helper')
    #4 /var/www/html/public/core/lib/Drupal/Core/Extension/ModuleHandler.php(562): captcha_form_alter(Array, Object(Drupal\Core\Form\FormState), 'views_exposed_f...')
    

    however it still works ?!? and no amount of cache clears help
    and drush php-eval "dump(Drupal::getContainer()->has('captcha.helper'));" = true

Production build 0.71.5 2024