reCaptcha script not being loaded#2893
Conversation
|
This change makes sense: the callback won't be executed when attempting to use a hook (an action) after it has been run. As far as I see the May be missing something but looking at all the comments suggests that reCAPTCHA v2 works but v3 fails. I'm not very familiar with how exactly the different versions of reCAPTCHA work, but as far as I see both require some js? Or perhaps the js for v2 was added in a different way? In any case this change shouldn't break anything and is good to go. |
|
@azaozz the issue comes from the main reCaptcha script not being loaded correctly. With the provided fix, both versions work as expected. |
Yep, I understand. What I was wondering about is why v2 works nevertheless. Seems this bug was introduced in Commit a6e0757 most likely by this change on L:139: a6e0757#diff-69b5a8dc728e5b801b8b59d2cf75e0470846f28cab3f1698413c5bcfb02c3fe6L139. Not understanding and fixing the underlying timing issue might eventually cause problems in the future when other scripts have to be enqueued, etc. In any case, this patch seems okay for now. |
Fixes #2850
Changes Proposed in this Pull Request
The reCAPTCHA scripts aren't being loaded on any themes other than the default ones.
Testing Instructions