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
Comments
Comment #2
Anonymous (not verified) commentedHello,
I've tried to replicate this issue but I was unable to.
The steps I took when trying to replicate this was loading module version 1.4 set it up and update it to the 1.5. I also tried replicating this using the development version of the module, In both cases the captcha I've set up appeared correctly and the error specified in the issue didn't appear. Could you please provide more information about how you've set up your captcha if you can?
Comment #3
onewomanbiz commentedHi,
Captcha is set up for images verification.. That's about it. It's only used on a simple contact page.
Comment #4
achraf.noomane commentedHello,
I'm having the same issue above, looks like the container if failing to pass the argument needed for the saptcha service
here is all the stack trace for the above issue
Thanks
Comment #5
anybodyMight be a caching issue or needs to clear caches in the update hook. I wasn't able to reproduce this yet.
Which PHP version are you using?
Comment #6
anybodyComment #7
grevil commentedCould not replicate this behaviour either and no more comments for a month now, hence I will close this issue.
Comment #8
taggartj commentedStrangest 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)
however it still works ?!? and no amount of cache clears help
and drush php-eval "dump(Drupal::getContainer()->has('captcha.helper'));" = true