Hmm strange, I’ve confirmed it on your site but can’t recreate locally.
To debug can you do the following:
1. Add this code to line 66 of the wp-content/plugins/wpum-recaptcha/includes/actions.php (so it’s above return new WP_Error(...):
error_log( print_r( $resp->getErrorCodes(), true ) );
2. Can edit your wp-config.php file to replace this line –
define( ‘WP_DEBUG’, false );
With these lines –
define(‘WP_DEBUG’, true);
define(‘WP_DEBUG_LOG’, true);
define(‘WP_DEBUG_DISPLAY’, false);
This means that any errors are logged to `/wp-content/debug.log’, because some errors are not visible on screen.
More details about that at
http://codex.ww.wp.xz.cn/Editing_wp-config.php#Debug
Can you then retry the process and send me the debug.log file that should be created.
Thanks for the prompt reply. I got this on debug.log:
[03-Nov-2019 18:40:55 UTC] PHP Warning: file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /usr/www/users/cititour/dev/mezinesdev/wp-content/plugins/wpum-recaptcha/vendor/google/recaptcha/src/ReCaptcha/RequestMethod/Post.php on line 80
[03-Nov-2019 18:40:55 UTC] PHP Warning: file_get_contents(https://www.google.com/recaptcha/api/siteverify): failed to open stream: no suitable wrapper could be found in /usr/www/users/cititour/dev/mezinesdev/wp-content/plugins/wpum-recaptcha/vendor/google/recaptcha/src/ReCaptcha/RequestMethod/Post.php on line 80
[03-Nov-2019 18:40:55 UTC] Array
(
[0] => connection-failed
)
I’ll be doing some Google’ing while I wait for your input! Thanks again!
I’ll ask my client if he can change allow_url_fopen=0 to 1 in php.ini so we can test while we wait to hear from you and see if there’s a better solution. I’ll keep you posted!
We did the change on a user.ini and it’s working great now. Thanks! I’ll still wait for your reply maybe there’s a better solution you can provide.
I’ve just released version 2.0.4 which forces the Google ReCaptcha library to use WordPress native code to perform requests, instead of using file_get_contents, which might be disabled as it is on your client’s server.
Let me know how that works out.
Sorry for the late reply! I didn’t catch this one before, but yeah I wanted to let you know it worked! We pushed the site live and the update did the trick there, no need to do the allow_url_fopen workaround anymore.
Thanks!