Page MenuHomePhabricator

ConfirmEdit noCaptchaReCaptcha never succeeds
Closed, InvalidPublic

Description

No matter how many times you verify you are not a robot, the wiki will not let you post an edit always displaying the error: Incorrect or missing CAPTCHA.

I have verified this with an out of the box 1.27.0 install: http://wiki.o.o.tipit.net/index.php/Main_Page

Extension Config:

#Enable ReCaptchaNoCaptcha
wfLoadExtensions( array( 'ConfirmEdit', 'ConfirmEdit/ReCaptchaNoCaptcha' ) );

$wgCaptchaClass = 'ReCaptchaNoCaptcha';

$wgReCaptchaSiteKey = "<redacted>";
$wgReCaptchaPrivateKey = "<redacted>";

$wgCaptchaTriggers['edit']          = true;
$wgCaptchaTriggers['create']        = true;
$wgCaptchaTriggers['createtalk']    = true;
$wgCaptchaTriggers['addurl']        = true;
$wgCaptchaTriggers['createaccount'] = true;
$wgCaptchaTriggers['badlogin']      = true;

[14:44:08] <jpmaxman> Greetings media wiki crew. I'm trying to help the OpenStack foundation eliminate spam on their wiki. They were on a pre-release of 1.25. So I've upgraded everything to 1.27. I have the NoCaptcha displaying, problem is that even after checking the box to confirm I am not mr robot, it says "Incorrect or missing CAPTCHA." At this point I have removed all
[14:44:08] <jpmaxman> non-included extensions and have reverted back to the default Vector theme included with 1.27, but am still facing the same problem. Wondering if anyone has any ideas or could trigger some thought on next steps for troubleshooting. There are no errors in the console or anything I've found in the logs.

Event Timeline

This comment was removed by JpMaxMan.
JpMaxMan updated the task description. (Show Details)

Hi @JpMaxMan!

Thanks for reporting this issue! I've tested it locally with my environment, after going back to the 1.27 mediawiki release (both mediawiki core and ConfirmEdit). I setup ReCaptcha NoCaptcha as a CAPTCHA module and tested it with a trigger for edit. So far, so good :P

In my tests, the validation of the CAPTCHA works great, and I can save my edit, if I check, that I'm not a robot. However, not checking the checkbox prevents me from saving my edit. So as far as you haven't any special installation/extensions, it seems to be an error in your setup (and from your Special:Version page of your wiki, it seems to be not the case, that there is any special thing).

So I would suggest, that you recheck, that your site and secret key's in your LocalSettings.php are correct. And, as I'm not sure, if this is an error of your paste, please make sure, you use the correct configuration variables. The $wgReCaptchaPrivateKey is for the ReCaptcha module (along with $wgReCaptchaPublicKey). ReCaptchaNoCaptcha uses $wgReCaptchaSiteKey for the site key of your ReCaptcha, and $wgReCaptchaSecretKey for the secret key. The configuration options of both modules aren't interchangeable, but you use the secret key config option of the no captcha module, but the private key config of the ReCaptcha module. So please use the template you find on the documentation page for your conifguration and it should work[1]:

wfLoadExtensions( array( 'ConfirmEdit', 'ConfirmEdit/ReCaptchaNoCaptcha' ) );

$wgCaptchaClass = 'ReCaptchaNoCaptcha';
$wgReCaptchaSiteKey = 'your public/site key here';
$wgReCaptchaSecretKey = 'your private key here'; # <- you used $wgReCaptchaPrivateKey here

[1] That no CAPTCHA is correct mostly indicates a problem with th eprivate/secret key :)

If you need further help, or if it still doesn't work, feel free to comment here (or contact me in IRC, if I'm online).

Florian claimed this task.

After talking with @JpMaxMan in IRC, he changed the config variable and now it works :) Marking this task as invalid.