Extension talk:ContactPage

About this board

previous talk on this page


1957Harry (talkcontribs)

I just installed the extension on my wiki 1.39 but the wiki freezes.

Just followed the instructions,

If I remove the extension code from localsettings the wiki works again

Please respond asap

Cavila (talkcontribs)
Reply to "Installing problems"
109.186.204.100 (talkcontribs)

Added this extensions in MW 1.40. In the mobile view there's no link in the footer. Is this configurable is some way? most people use mobile nowadays, so this seems like a useful feature

Reply to "Mobilefrontend footer"

⧽ around contact ⧼

3
Summary by BDavis (WMF)

The ⧼...⧽ output indicates a missing message matching the name within the guillemets. Creating a page matching the name in the MediaWiki namespace is the typical way to define the message text.

Zarathustra999 (talkcontribs)

When I used the suggested code in your extension description, with the msg( 'Contact' ) it generates "⧼Contact⧽" in the footer rather than "Contact", any ideas?


Mediawiki version = 1.40

There are multiple other extensions running.

BDavis (WMF) (talkcontribs)

That is a sign that a message named "Contact" was not found. The message system would be looking for a MediaWiki:Contact page on your wiki. If no such page is found then the message system would display the marker that you report seeing in the rendered HTML.

Zarathustra999 (talkcontribs)

Great, thanks! I assumed Special:Contact was its page. I created MediaWiki:Contact, with the text "Contact", and now it is perfect. Cheers for the extension.

Is is extension abandoned ?

3
Summary by Kghbln

No.

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.

SkinTemplateOutputPageBeforeExec removed from v1.37

6
31.48.59.165 (talkcontribs)

The SkinTemplateOutputPageBeforeExec hook has been removed since MediaWiki version 1.37 so the code to add the contact link to footer no longer works. The code needs updating.

Kghbln (talkcontribs)

Hmm, it will be cool to know what to do for newer versions of MediaWiki. @Jdlrobson: since you are the MediaWiki all about skin expert... You will probably know what to do instead of this.

Jdlrobson (talkcontribs)
Kghbln (talkcontribs)

Cool! Thanks for the link! I am not really a programmer but from looking at this it should be the SkinAddFooterLinks hook. The example looks straight forward to me. Once I get hold of a MW 1.37+ instance I will try it and report back.

Jdlrobson (talkcontribs)

Feel free to add me to the Gerrit patch! I'll happily review and help you solve any issues with that.

Kghbln (talkcontribs)

I have no idea how to do this in the code base of the extension via a configuration parameter. However, I have just added an example that system administrators can add to "LocalSettings.php" to get this done again.

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"

SenderEmail not working

9
Summary by Sophivorus

Fixed.

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.

Chrishel (talkcontribs)
Kghbln (talkcontribs)

This patch is 1.36.x or later only. However one can install the version for 1.36.x on an 1.35.x wiki. Let's see if it works for me.

MW 1.37.4 and captcha

2
Manbu (talkcontribs)

A. I get the error that i must log in to send emails (but email is verified and user-email is enabled). Who has an idea (also in mw1.38.2) - but i want it for guests


B. With debugger i get the error (after login) : ....Spezial:Kontakt ConfigException: GlobalVarConfig::get: undefined option: 'CaptchaClass'....

This is because in line 527 of specialcontact.php stands :

private function useCaptcha (....

527 return $config->get( 'CaptchaClass' )


captcha - class comes from Confirmedit (ResourceLoaderHooks.php line 22) , where it has the value 'MediaWiki\\Extensions\\ConfirmEdit\\hCaptcha\\HCaptcha'

I think this should be corrected (at least in the master)

Manbu (talkcontribs)
Reply to "MW 1.37.4 and captcha"
Xsteeplol (talkcontribs)

Hey all,


Is there any way to fill forms from url?


Example:

https://mediawiki.org/wiki/Special:Contact?email=info@example.com&subject=Test&text=this_is_a_test


Is there any way to have this like result or something else to fill a form from the URL?

Xsteeplol (talkcontribs)

Ehm... I found the solution for this problem by myself.

I write it here so that anyone who comes after me can find it;)


To fill a form from the URL, it is necessary to pass in the link the names of the inputs and their respective values.

You can find the names of the inputs by searching the source code, or by inspecting the page with a browser.

  • wpFromName is for the name field
  • wpFromAddress is for the email field
  • wpSubject is for the subject field
  • wpText is for the subject field


Example:

https://mediawiki.org/wiki/Special:Contact?wpFromName=James&wpFromAddress=info@example.com&wpSubject=Test&wpText=this_is_a_test


This will fill your form with:

  • James as name
  • info@example.com as email
  • Test as subject
  • this_is_a_test as message text

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.