Topic on Extension talk:ConfirmEdit

Star Warden (talkcontribs)

Hi. Our captcha trigger seems to be malfunctioning since this morning and there have already appeared some spammy accounts. I am getting these errors while on the login page (http://dragon-mania-legends-wiki.mobga.me/Special:UserLogin):

Notice: Undefined index: badlogin /srv/dml-wiki/extensions/ConfirmEdit/SimpleCaptcha/Captcha.php on line 348

Notice: Undefined index: badloginperuser in /srv/dml-wiki/extensions/ConfirmEdit/SimpleCaptcha/Captcha.php on line 365

and on the create account page (http://dragon-mania-legends-wiki.mobga.me/Special:CreateAccount):

Notice: Undefined index: createaccount in /srv/dml-wiki/extensions/ConfirmEdit/SimpleCaptcha/Captcha.php on line 924

I don't understand why it does that since we're using QuestyCaptcha and not SimpleCaptcha. Deleting the folder brings the wiki down. I tried disabling SimpleCaptcha in /ConfirmEdit/extension.json under AutoloadClasses (line 51), but no luck.

We're using the REL1_27 version of ConfirmEdit. I disabled create accounts, for now, so the error on the createaccount page cannot be seen, but the ones on the login page can be seen. The console doesn't display any related java errors, so I am not sure what's causing it....

The exact same issue happens on the wiki, used for testing purposes, installed on my PC (through xampp).

Kghbln (talkcontribs)

When updating from MW 1.25 to MW 1.27 a couple of days ago did you also really upgrade ConfirmEdit from REL1_25 to REL1_27?

Now with REL1_27 you should add something like the following to you "LocalSettings.php" when using e.g. ReCaptcha:

## ConfirmEdit
wfLoadExtensions( array(
        'ConfirmEdit',
        'ConfirmEdit/ReCaptchaNoCaptcha'
        )
);
$wgCaptchaClass = 'ReCaptchaNoCaptcha';
$wgReCaptchaSiteKey = 'myKey';
$wgReCaptchaSecretKey = 'mySecretKey';
$wgCaptchaTriggers['edit'] = true;
$wgCaptchaTriggers['create'] = true;
// $wgCaptchaTriggers['addurl'] = false;
Kghbln (talkcontribs)

Yeah, indeed you are on REL1_27 so I suspect the configuration as the cause.

Star Warden (talkcontribs)

Hey. We are not using ReCaptcha, but QuestyCaptcha. This is the configuration. I will replace the answers themselves with 'answer#', for security reasons.

wfLoadExtensions( array( 'ConfirmEdit', 'ConfirmEdit/QuestyCaptcha' ) );
$wgCaptchaClass = 'QuestyCaptcha';
$wgCaptchaQuestions[] = array( 'question' => "What game does this wiki cover?", 'answer' => array( 'answer1', 'answer2', 'answer3', 'answer4', 'answer5', 'answer6' ) );
$wgCaptchaTriggers['wikiforum'] = true;
$wgGroupPermissions['autoconfirmed']['skipcaptcha'] = true;
Star Warden (talkcontribs)

Hi again. I tried using ReCaptcha, as well. This was the configuration:

wfLoadExtensions( array( 'ConfirmEdit', 'ConfirmEdit/ReCaptchaNoCaptcha' ) );
$wgCaptchaClass = 'ReCaptchaNoCaptcha';
$wgReCaptchaSiteKey = 'key';
$wgReCaptchaSecretKey = 'key';

But it still shows the same undefined indexes related to SimpleCaptcha. Isn't there a way to get rid of SimpleCaptcha? I just want to use Questy. It worked wonders, so far.

Star Warden (talkcontribs)

Also, both ConfirmEdit and the MediaWiki software are on 1_27.

Kghbln (talkcontribs)

That's strange. I run several wikis with 1.27.1 and ConfirmEdit without getting this. My QuestyCaptcha setup is however a bit different:

## ConfirmEdit
wfLoadExtensions( array(
        'ConfirmEdit',
        'ConfirmEdit/QuestyCaptcha'
        )
);
$wgCaptchaClass = 'QuestyCaptcha';
$wgCaptchaTriggers['edit'] = true;
$wgCaptchaTriggers['create'] = true;
// $wgCaptchaTriggers['addurl'] = false;
$arr = array(
        "MyQuestion" => "MyAnswer",
        "MyQuestion" => "MyAnswer",
        "MyQuestion" => "MyAnswer"
        );
foreach ( $arr as $key => $value ) {
        $wgCaptchaQuestions[] = array(
        	'question' => $key,
		'answer' => $value
        	);
	}
Star Warden (talkcontribs)

Well, I tried using your configuration and I am still getting the same issues. I even re-downloaded ConfirmEdit and run both composer update and php update.php. What is happening?

Star Warden (talkcontribs)

Okay, now that's very strange. The issue fixed itself after I moved the entire code at the bottom of localsettings.php... But why? Why was the position important?

Also, I assume two different captchas can't be used at the same time, right? Like QuestyCaptcha + ReCaptcha.

I've wrote more details about the whole issue and the workaround to it here: https://www.mediawiki.org/wiki/Topic:Temsrqh8dj4mbpgg

Kghbln (talkcontribs)

No, two different CAPTCHAS cannot be used at a time and yes the position within the "LocalSettings.php" makes a difference in some cases. Thanks for linking to the related topic.

Reply to "Captcha Issues"