MediaWiki | 1.26.2 |
PHP | 5.3.29 (apache2handler) |
MySQL | 5.0.95 |
ConfirmEdit | 1.4.0 |
ContactPage | 2.2 |
Semantic Maps | 3.2 |
Semantic MediaWiki | 2.3 |
I'm a bit confused by the following:
My contact form works fine when logged in. But when not logged in, I get
Catchable fatal error: Argument 1 passed to ReCaptcha::getForm() must be an instance of OutputPage, none given, called in /www/htdocs/drebbel/wiki/extensions/ContactPage/ContactPage_body.php on line 488 and defined in/www/htdocs/drebbel/wiki/extensions/ConfirmEdit/ReCaptcha/ReCaptcha.class.php on line 12
___
My LocalSettings.php:
wfLoadExtensions( array( 'ConfirmEdit', 'ConfirmEdit/ReCaptcha' ) );
require_once "$IP/extensions/ContactPage/ContactPage.php";
$wgContactUser = 'xxxx';
$wgContactSender = $wgPasswordSender;
$wgContactSenderName = 'Contact Form on ' . $wgSitename;
$wgContactConfig['default'] = array(
'RecipientUser' => 'xxxx', // Must be the name of a valid account which also has a verified e-mail-address added to it.
'SenderName' => 'Contact Form on ' . $wgSitename, // "Contact Form on" needs to be translated
'SenderEmail' => null, // Defaults to $wgPasswordSender, may be changed as required
'RequireDetails' => true, // Either "true" or "false" as required
'IncludeIP' => true, // Either "true" or "false" as required
'AdditionalFields' => array(
'Text' => array(
'label-message' => 'emailmessage',
'type' => 'textarea',
'rows' => 10,
'cols' => 80,
'required' => true, // Either "true" or "false" as required
),
),
// Added in MW 1.26
'DisplayFormat' => 'table', // See HTMLForm documentation for available values.
'RLModules' => array(), // Resource loader modules to add to the form display page.
'RLStyleModules' => array(), // Resource loader CSS modules to add to the form display page.
);
$wgCaptchaClass = 'ReCaptcha';
$wgReCaptchaPublicKey = '6xxxxK';
$wgReCaptchaPrivateKey = '6xxxxi';
$wgGroupPermissions['*' ]['skipcaptcha'] = false;
$wgGroupPermissions['user' ]['skipcaptcha'] = true;
$wgGroupPermissions['autoconfirmed']['skipcaptcha'] = true;
$wgGroupPermissions['bot' ]['skipcaptcha'] = true; // registered bots
$wgGroupPermissions['sysop' ]['skipcaptcha'] = true;
$wgCaptchaTriggers['edit'] = true;
$wgCaptchaTriggers['create'] = true;
$wgCaptchaTriggers['createaccount'] = true;
$wgCaptchaTriggers['contactpage'] = true; // Adds reCAPTCHA to the contact page if created
_________________
I've changed the function getForm( OutputPage $out ) into getform() {in ReCaptcha.class.php} and now it works fine apart from the fact that one often has to refresh the contactpage for the Captcha to appear.