Topic on Extension talk:ContactPage

Lefthandside (talkcontribs)

Hey all,


Here's the error:

[6381f7065ce15687504f95a5] 2020-10-03 20:26:57: Fatal exception of type "ConfigException"


Here's my config settings:

## Contact Page Extension.

wfLoadExtension( 'ContactPage' );

$wgContactConfig['default'] = array(

   'RecipientUser' => 'Contact', // 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' => 'contact@lefthandside.wiki', // Defaults to $wgPasswordSender, may be changed as required

   'RequireDetails' => true, // Either "true" or "false" as required

   'IncludeIP' => true, // Either "true" or "false" as required

   'MustBeLoggedIn' => true, // Check if the user is logged in before rendering the form

   'AdditionalFields' => array(

       'Text' => array(

           'label-message' => 'emailmessage',

           'type' => 'textarea',

           'rows' => 20,

           '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.

);


Have I messed something up here?

Tlgonline (talkcontribs)

I suggest that you remove:


'DisplayFormat' => 'table',  // See HTMLForm documentation for available values.

Tlgonline (talkcontribs)

The extension.json file included in the Master version states the following defaults:


"RecipientUser": null,

"SenderEmail": null,

"SenderName": null,

"RequireDetails": false,

"IncludeIP": false,

"MustBeLoggedIn": false,

"RLModules": [],

"RLStyleModules": [],

"AdditionalFields": {

"Text": {

"label-message": "emailmessage",

"type": "textarea",

"required": true

}

Evilrockmusic (talkcontribs)

Hi everyone. I am also seeing the Fatal exception of type "ConfigException" error. Is there anything else that I can try out to fix it? Thanks.

Ammarpad (talkcontribs)

See Manual:How to debug. Also set $wgShowExceptionDetails = true; in LocalSettings.php and then copy the full exception stack trace to here.

Evilrockmusic (talkcontribs)

Here's what I'm seeing:

[8555d875b2e353a221f37840] /wiki/index.php/Special:Contact ConfigException from line 59 of C:\Bitnami\mediawiki-1.35.0-0\apps\mediawiki\htdocs\includes\config\GlobalVarConfig.php: GlobalVarConfig::get: undefined option: 'CaptchaClass'

Backtrace:

#0 C:\Bitnami\mediawiki-1.35.0-0\apps\mediawiki\htdocs\extensions\ContactPage\includes\SpecialContact.php(478): GlobalVarConfig->get(string)

#1 C:\Bitnami\mediawiki-1.35.0-0\apps\mediawiki\htdocs\extensions\ContactPage\includes\SpecialContact.php(192): SpecialContact->useCaptcha()

#2 C:\Bitnami\mediawiki-1.35.0-0\apps\mediawiki\htdocs\includes\specialpage\SpecialPage.php(600): SpecialContact->execute(NULL)

#3 C:\Bitnami\mediawiki-1.35.0-0\apps\mediawiki\htdocs\includes\specialpage\SpecialPageFactory.php(635): SpecialPage->run(NULL)

#4 C:\Bitnami\mediawiki-1.35.0-0\apps\mediawiki\htdocs\includes\MediaWiki.php(307): MediaWiki\SpecialPage\SpecialPageFactory->executePath(Title, RequestContext)

#5 C:\Bitnami\mediawiki-1.35.0-0\apps\mediawiki\htdocs\includes\MediaWiki.php(940): MediaWiki->performRequest()

#6 C:\Bitnami\mediawiki-1.35.0-0\apps\mediawiki\htdocs\includes\MediaWiki.php(543): MediaWiki->main()

#7 C:\Bitnami\mediawiki-1.35.0-0\apps\mediawiki\htdocs\index.php(53): MediaWiki->run()

#8 C:\Bitnami\mediawiki-1.35.0-0\apps\mediawiki\htdocs\index.php(46): wfIndexMain()

#9 {main}

Ammarpad (talkcontribs)

Yeah, this is a known issue, I have uploaded this patch to fix it some few days ago.

Evilrockmusic (talkcontribs)

Looks good. Thanks for the help!

Evilrockmusic (talkcontribs)

I have an update after doing a bit more testing. It seems the form is visible with ReCaptcha, but not with SimpleCaptcha. I am using the latest master branch.

Ammarpad (talkcontribs)

This issue is now fixed.

Evilrockmusic (talkcontribs)

I appreciate it.

Nasirkhan (talkcontribs)

I am facing the same issue with my MW1.35.1.


[6711a412b4938b211d2c0fbf] /php/banglapedia_en/index.php/Special:Contact ConfigException from line 59 of C:\mw\includes\config\GlobalVarConfig.php: GlobalVarConfig::get: undefined option: 'CaptchaClass'

Backtrace:

#0 C:\mw\extensions\ContactPage\includes\SpecialContact.php(483): GlobalVarConfig->get(string)

#1 C:\mw\extensions\ContactPage\includes\SpecialContact.php(192): SpecialContact->useCaptcha()

#2 C:\mw\includes\specialpage\SpecialPage.php(600): SpecialContact->execute(NULL)

#3 C:\mw\includes\specialpage\SpecialPageFactory.php(635): SpecialPage->run(NULL)

#4 C:\mw\includes\MediaWiki.php(307): MediaWiki\SpecialPage\SpecialPageFactory->executePath(Title, RequestContext)

#5 C:\mw\includes\MediaWiki.php(940): MediaWiki->performRequest()

#6 C:\mw\includes\MediaWiki.php(543): MediaWiki->main()

#7 C:\mw\index.php(53): MediaWiki->run()

#8 C:\mw\index.php(46): wfIndexMain()

#9 {main}

193.48.45.27 (talkcontribs)

Hi guys

I'm also facing this issue with MW 1.35.1.

InnerCitadel (talkcontribs)

Same issue for me on 1.35.2

Ammarpad (talkcontribs)

Unfortunately, I think you need to use either 1.35 or >= 1.36 as that's the only branches where the fix is. Otherwise you can copy the patch and maintain it locally to any branch you want.

77.174.213.115 (talkcontribs)

I also git this error on MediaWiki 1.37, even while I was loading the ConfirmEdit extension. But I found out that I hadn't configured a CAPTCHA types for the ConfirmEdit extension. After adding 'ConfirmEdit/QuestyCaptcha' too as an extension, the error disappeared. Maybe there could be a safety check added in ContactPage to check if there is actually a CAPTCHA type installed?

212.204.154.107 (talkcontribs)

Error still present in MW1.39.2:

[2f30b175fd52d92f33fdfab2] /index.php/Special:Contact   ConfigException: GlobalVarConfig::get: undefined option: 'CaptchaClass'
Backtrace:
from /home/www/site/includes/config/GlobalVarConfig.php(59)
 #0 /home/www/site/extensions/ContactPage/includes/SpecialContact.php(519): GlobalVarConfig->get(string)
 #1 /home/www/site/extensions/ContactPage/includes/SpecialContact.php(218): MediaWiki\Extension\ContactPage\SpecialContact->useCaptcha()
 #2 /home/www/site/includes/specialpage/SpecialPage.php(701): MediaWiki\Extension\ContactPage\SpecialContact->execute(NULL)
 #3 /home/www/site/includes/specialpage/SpecialPageFactory.php(1428): SpecialPage->run(NULL)
 #4 /home/www/site/includes/MediaWiki.php(316): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
 #5 /home/www/site/includes/MediaWiki.php(904): MediaWiki->performRequest()
 #6 /home/www/site/includes/MediaWiki.php(562): MediaWiki->main()
 #7 /home/www/site/index.php(50): MediaWiki->run()
 #8 /home/www/site/index.php(46): wfIndexMain()
 #9 {main}
Reply to "Fatal Exception"