Extension talk:ContactPage

Jump to navigation Jump to search

About this board

previous talk on this page


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.

Reply to "Fatal Exception"

Is is extension abandoned ?

3
Nasirkhan (talkcontribs)

This extension shows fatal error after installation, the issue has been reported more than 6 months ago and no patch solved the issue yet. Is there any specific reason of marking this extension as Stable?


Issue: Topic:Vv5ip5dhle216ufk

Ammarpad (talkcontribs)

No, that's not true. There's comment there showing how it was fixed. You just need to use the right branch which contains the fix (or to apply it yourself)

Nasirkhan (talkcontribs)

I did not find any solution there. Even I posted my errors and did not got any response in last 4 months! Though you mentioned a number of times that the issue has been fixed. I downloaded Mediawiki 1.35.1 and downloaded the related version of this extension, followed the steps to install and configure but it throws error.


You can change the status to 'Stable' and say many times that the issues has been fixed. But the real scenario is totally different than your world.


The extension does not work at all, no one respond to the talk page issue for months, which only happened on abandoned tools. This is totally unacceptable.

Reply to "Is is extension abandoned ?"
Mshastchi (talkcontribs)

I want the emails to be sent from the email of the site (e.g info@example.com) but the email is sent from the email the user has entered in the form. This may cause the email services to consider the email spam because the server is not the one to which the email belong.

Ammarpad (talkcontribs)

It seems this is hardcoded, so it is not allowed to be changed. However you can edit the extension files to make the desired change and maintain it.

184.103.0.165 (talkcontribs)

Can you point where to change?

Sophivorus (talkcontribs)
MyWikis-JeffreyWang (talkcontribs)

I agree that @Sophivorus's change should be merged in, as the current state of the extension makes it impossible to work with SES. When will the merge occur?

MyWikis-JeffreyWang (talkcontribs)

After testing @Sophivorus's change, there's only one issue left: the actual sending address is still being sent a copy of the message. This should be removed.

MyWikis-JeffreyWang (talkcontribs)

We've implemented this change on our fork of ContactPage, where we've completely removed the option to CC, and removed the email sending to the specified from address. This is because we do not want to take the risk of sending an email to a completely unvetted, unknown email address, which might bounce, and that's problematic for anyone using AWS SES.

This solution probably doesn't work for everyone, so the developers of this extension can feel free to implement changes however they wish.

Reply to "SenderEmail not working"

Dependancy to ConfirmEdit extension

6
Summary by Raphoraph

Patched in the last version for MW 1.35.

Raphoraph (talkcontribs)

Hi, the extension fails if you don't use the ConfirmEdit extension : on includes/SpecialContact.php(478), GlobalVarConfig->get(string) fails (ConfigException) to fetch the captcha's settings as they do not exist. On our wiki, we use instead the antispam extension, and we must add

$wgCaptchaClass = "";
$wgCaptchaTriggers = [];

to make the ContactPage work even though we don't have ConfirmEdit enabled.

Would it be possible for you to fix it (just for example checking that the two variables are defined/catching the exception thrown by GlobalVarConfig.php) ?

Best regards,

BDavis (WMF) (talkcontribs)
Raphoraph (talkcontribs)

Yes, it is exactly that, thanks ! So I need to wait next version ?

BDavis (WMF) (talkcontribs)

The fix is currently included in the master branch tarball. The patch looks like it could probably be backported to the 1.35 branch too which would probably be nicer for folks who are trying to use stable branches.

BDavis (WMF) (talkcontribs)

> The patch looks like it could probably be backported to the 1.35 branch too which would probably be nicer for folks who are trying to use stable branches.

It has already been backported and merged, so just downloading a new copy of the 1.35 tarball should fix your issues.

Raphoraph (talkcontribs)

Oh, I didn't check the new version before posting my message... in fact I've had the problem before this patch but I've posted this note only 5 days ago. Thanks, I will download it and make the update, and tell if it works.

Please add CSS IDs to "your name", "your email" and "subject"

1
49.230.199.165 (talkcontribs)

This would allow controlling these in CSS very easily.

I suggest:

#ContactPage_your_name

#ContactPage_your_email

#ContactPage_subject

Reply to "Please add CSS IDs to "your name", "your email" and "subject""

To not duplicate data I refer the community to this post in support desk

1
182.232.193.236 (talkcontribs)
Reply to "To not duplicate data I refer the community to this post in support desk"

Should OOUI be enabled for ContactPage in a separate process than for MediaWiki core?

1
49.230.62.86 (talkcontribs)

MediaWiki 1.34.2 which is generally all core;

I didn't find any documentation on this so I ask here to make sure:

Should OOUI be enabled for ContactPage in a separate process than for MediaWiki core?

(or, enabling OOUI for the entire website should cover ContactPage anyway if ContactPage configuration is all core?)

Reply to "Should OOUI be enabled for ContactPage in a separate process than for MediaWiki core?"

CCS rules to 'RLStyleModules' => array()

1
91.65.129.55 (talkcontribs)

Please give an example of how to put CSS rules in 'RLStyleModules' => array()

Reply to "CCS rules to 'RLStyleModules' => array()"

E-mail address a part of the text

2
91.65.129.55 (talkcontribs)

How to make the e-mail address of the writer a part of the text

91.65.129.55 (talkcontribs)

Got a resolution for LocalSettings.php:

$wgHooks['EmailUser'][] = function ( &$address, &$from, &$subject, &$text, &$error ) {

...

 $text = $text . 'E-Mail-Adresse:: ' . $from->address;

  ...

};

Reply to "E-mail address a part of the text"

Hide the option "Send a copy of the e-mail to me"

1
91.65.129.55 (talkcontribs)

How do I hide (disable) the option "Send a copy of the e-mail to me"?

Reply to "Hide the option "Send a copy of the e-mail to me""