-
- 61 Posts
I have tried adding RecaptchaV2 to a client's website. It will render and I can check the box, but when I submit the form it fails and just reloads the page instead of taking me to my success message.
I get this error: (ERROR @ C:\inetpub\sites\dev.parksideinc_2016\core\components\formit\src\FormIt\Request.php : 87) [FormIt] Could not load FormItReCaptcha service class.
Digging further into the FormIt code, it seems to be an issue in the base code of FormIt itself. Its trying to load the default recaptcha classes because of the way it checks for the "hooks". If you try to use any hook with 'recaptcha' anywhere in the name, it will try to load the default version of recaptcha and thats whats causing it to fail.
Formit and Recaptcha are both up to date. Anyone ran into this issue before?
Thanks,
Steve
-
- 140 Posts
Any progress on this topic? Still getting: Could not load FormItReCaptcha service class. Trying to poke around in the code, but no luck so far.
-
- 24,544 Posts
I think using strpos to evaluate the hookname is kinda weird
Using strpos() is pretty common because it's faster than substr() and *way* faster then using a regular expression. It does mean that the hook name has to be spelled exactly the same way everywhere, though.