Page MenuHomePhabricator

ReCaptcha, and ReCaptchNoCaptcha do not display in MediaWiki 1.25.1
Closed, ResolvedPublic

Description

After upgrading to 1.25.1 including replaceing all extentions Recaptcha could not be made to display on new account creation.

The following was tryed on the stock 1.25.1 and 1.25.1 with the current master of ConfirmEdit git installed.

Any one of the 3 Below.
require_once "$IP/extensions/ConfirmEdit/ReCaptcha.php";
wfLoadExtension( 'ConfirmEdit/ReCaptcha' );
wfLoadExtension( 'ConfirmEdit/ReCaptchaNoCaptcha' );

One of the 2 below
$wgCaptchaClass = 'ReCaptcha';
$wgCaptchaClass = 'ReCaptchaNoCaptcha'; //used with the ReCaptchaNoCaptcha load extention.

For all testing the following was defined.

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

LocalSettings.php

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

$wgMainCacheType = CACHE_ANYTHING;

  1. Query string length limit for ResourceLoader. You should only set this if
  2. your web server has a query string length limit (then set it to that limit),
  3. or if you have suhosin.get.max_value_length set in php.ini (then set it to
  4. that value)

$wgResourceLoaderMaxQueryLength = -1;

  1. End of automatically generated settings.
  2. Add more configuration options below.

/*
require_once( "$IP/extensions/recaptcha/ReCaptcha.php" );
// Sign up for these at https://www.google.com/recaptcha/admin/create
$recaptcha_public_key = 'Censored';
$recaptcha_private_key = 'Censored';

$wgShowExceptionDetails = false;
*/
//require_once("$IP/extensions/CharInsert/CharInsert.php");

  1. Enabled Extensions. Most extensions are enabled by including the base extension file here
  2. but check specific extension documentation for more details
  3. The following extensions were automatically enabled:

require_once "$IP/extensions/ConfirmEdit/ConfirmEdit.php";
wfLoadExtension( "ConfirmEdit");
wfLoadExtension( 'ConfirmEdit/ReCaptcha' );
wfLoadExtension( 'ParserFunctions' );
wfLoadExtension( 'PdfHandler' );
wfLoadExtension( 'WikiEditor' );
wfLoadExtension( 'CharInsert' );
wfLoadExtension( 'ConfirmEdit/ReCaptchaNoCaptcha' );

require_once "$IP/extensions/ConfirmEdit/ReCaptcha.php";
$wgCaptchaClass = 'ReCaptcha';
$wgCaptchaClass = 'ReCaptchaNoCaptcha';
$wgCaptchaClass = 'ReCaptcha';
$wgReCaptchaPublicKey = 'Censored';
$wgReCaptchaPrivate_Key = 'Censored';

PHP ERROR LOG ( 1.25.1 stock and require_once "$IP/extensions/ConfirmEdit/ReCaptcha.php";)

[Sun Jul 26 14:39:07.083190 2015] [php5:error] [pid 1586] [client 192.168.0.1:39747] PHP Warning: call_user_func() expects parameter 1 to be a valid callback, class 'ConfirmEditHooks' not found in /srv/www/htdocs/MMO/includes/registration/ExtensionRegistry.php on line 169, referer: http://final.servegame.com/MMO/index.php/Main_Page
[Sun Jul 26 14:39:07.154280 2015] [php5:error] [pid 1586] [client 192.168.0.1:39747] PHP Warning: call_user_func() expects parameter 1 to be a valid callback, function 'efReCaptcha' not found or invalid function name in /srv/www/htdocs/MMO/includes/Setup.php on line 678, referer: http://final.servegame.com/MMO/index.php/Main_Page
[Sun Jul 26 14:39:07.549883 2015] [php5:error] [pid 15683] [client 192.168.0.1:40815] PHP Warning: call_user_func() expects parameter 1 to be a valid callback, class 'ConfirmEditHooks' not found in /srv/www/htdocs/MMO/includes/registration/ExtensionRegistry.php on line 169
[Sun Jul 26 14:39:07.622503 2015] [php5:error] [pid 15683] [client 192.168.0.1:40815] PHP Warning: call_user_func() expects parameter 1 to be a valid callback, function 'efReCaptcha' not found or invalid function name in /srv/www/htdocs/MMO/includes/Setup.php on line 678
[Sun Jul 26 14:39:07.636659 2015] [php5:error] [pid 15684] [client 192.168.0.1:39749] PHP Warning: call_user_func() expects parameter 1 to be a valid callback, class 'ConfirmEditHooks' not found in /srv/www/htdocs/MMO/includes/registration/ExtensionRegistry.php on line 169, referer: http://final.servegame.com/MMO/index.php?title=Special:UserLogin&returnto=Main+Page&type=signup
[Sun Jul 26 14:39:07.636659 2015] [php5:error] [pid 1585] [client 192.168.0.1:39748] PHP Warning: call_user_func() expects parameter 1 to be a valid callback, class 'ConfirmEditHooks' not found in /srv/www/htdocs/MMO/includes/registration/ExtensionRegistry.php on line 169, referer: http://final.servegame.com/MMO/index.php?title=Special:UserLogin&returnto=Main+Page&type=signup
[Sun Jul 26 14:39:07.741681 2015] [php5:error] [pid 15684] [client 192.168.0.1:39749] PHP Warning: call_user_func() expects parameter 1 to be a valid callback, function 'efReCaptcha' not found or invalid function name in /srv/www/htdocs/MMO/includes/Setup.php on line 678, referer: http://final.servegame.com/MMO/index.php?title=Special:UserLogin&returnto=Main+Page&type=signup
[Sun Jul 26 14:39:08.309899 2015] [php5:error] [pid 1585] [client 192.168.0.1:39748] PHP Warning: call_user_func() expects parameter 1 to be a valid callback, function 'efReCaptcha' not found or invalid function name in /srv/www/htdocs/MMO/includes/Setup.php on line 678, referer: http://final.servegame.com/MMO/index.php?title=Special:UserLogin&returnto=Main+Page&type=signup
[Sun Jul 26 14:39:09.239714 2015] [php5:error] [pid 1585] [client 192.168.0.1:39748] PHP Warning: call_user_func() expects parameter 1 to be a valid callback, class 'ConfirmEditHooks' not found in /srv/www/htdocs/MMO/includes/registration/ExtensionRegistry.php on line 169, referer: http://final.servegame.com/MMO/index.php?title=Special:UserLogin&returnto=Main+Page&type=signup
[Sun Jul 26 14:39:09.311289 2015] [php5:error] [pid 1585] [client 192.168.0.1:39748] PHP Warning: call_user_func() expects parameter 1 to be a valid callback, function 'efReCaptcha' not found or invalid function name in /srv/www/htdocs/MMO/includes/Setup.php on line 678, referer: http://final.servegame.com/MMO/index.php?title=Special:UserLogin&returnto=Main+Page&type=signup
[Sun Jul 26 14:39:09.509808 2015] [php5:error] [pid 1585] [client 192.168.0.1:39748] PHP Warning: call_user_func() expects parameter 1 to be a valid callback, class 'ConfirmEditHooks' not found in /srv/www/htdocs/MMO/includes/registration/ExtensionRegistry.php on line 169, referer: http://final.servegame.com/MMO/index.php?title=Special:UserLogin&returnto=Main+Page&type=signup
[Sun Jul 26 14:39:09.581598 2015] [php5:error] [pid 1585] [client 192.168.0.1:39748] PHP Warning: call_user_func() expects parameter 1 to be a valid callback, function 'efReCaptcha' not found or invalid function name in /srv/www/htdocs/MMO/includes/Setup.php on line 678, referer: http://final.servegame.com/MMO/index.php?title=Special:UserLogin&returnto=Main+Page&type=signup
[Sun Jul 26 14:39:09.848984 2015] [php5:error] [pid 1585] [client 192.168.0.1:39748] PHP Warning: call_user_func() expects parameter 1 to be a valid callback, class 'ConfirmEditHooks' not found in /srv/www/htdocs/MMO/includes/registration/ExtensionRegistry.php on line 169, referer: http://final.servegame.com/MMO/index.php?title=Special:UserLogin&returnto=Main+Page&type=signup
[Sun Jul 26 14:39:09.920322 2015] [php5:error] [pid 1585] [client 192.168.0.1:39748] PHP Warning: call_user_func() expects parameter 1 to be a valid callback, function 'efReCaptcha' not found or invalid function name in /srv/www/htdocs/MMO/includes/Setup.php on line 678, referer: http://final.servegame.com/MMO/index.php?title=Special:UserLogin&returnto=Main+Page&type=signup
[Sun Jul 26 14:39:09.931806 2015] [access_compat:error] [pid 15684] [client 192.168.0.1:39749] AH01797: client denied by server configuration: /usr/share/apache2/error/HTTP_NOT_FOUND.html.var, referer: http://final.servegame.com/MMO/load.php?debug=false&lang=en&modules=mediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.sectionAnchor%2Cui%7Cmediawiki.skinning.interface%7Cmediawiki.special.userlogin.common.styles%7Cmediawiki.special.userlogin.signup.styles%7Cmediawiki.ui.button%2Ccheckbox%2Cinput%2Cradio%7Cskins.vector.styles&only=styles&skin=vector&*

Event Timeline

Eadthem raised the priority of this task from to Needs Triage.
Eadthem updated the task description. (Show Details)
Eadthem subscribed.

Part of the problem seems to be the 1.25.1 tarball is missing e5cb34c0583cee9ead0f

After debugging on irc, issue appeared to be:

*Broken version included in 1.25.1
*Unclear installation instructions for this extension.

Leaving bug open for the, next tarball should not include broken confirmEdit.

Eadthem claimed this task.
This comment was removed by Eadthem.

After working with bawolff on IRC, we found the following errors

require_once "$IP/extensions/ConfirmEdit/ConfirmEdit.php";
Is required in LocalSettings.php and was removed during testing other things.

Line 147 ish of ConfirmEditHooks.php was wrong in MW1.25.1

GIT Master has the following line.

		require_once( __DIR__ . '/../ReCaptcha/recaptchalib.php' );

The addtion of DIR and a slash is required if media wiki is not installed in the webroot.

Reopend per Bawolff

I tested REL1_25 in my local environment and it works with the ReCaptcha module. The bug should be fixed with https://gerrit.wikimedia.org/r/#/c/214668/1

@Eadthem Can you check the latest version of ConfirmEdit in the REL1_25 branch (e.g. download the extension again from the Extension Distributor) and report back if it works or not? :) Thanks!

@Eadthem Have you checked the latest version? If there is still a problem, feel free to reopen this task :)

Aklapper claimed this task.

@Eadthem: Have you checked version 1.25.2? If there is still a problem, please reopen this task.