Extension talk:ContactPage

Jump to: navigation, search

About this board

previous talk on this page


Legaulph (talkcontribs)
MediaWiki 1.30.0
PHP 7.1.8 (apache2handler)
Semantic MediaWiki 2.5.6
Page Forms 4.2.1 (624f2a9) 18:20, 16 January 2018

[Wpf6sF7wzj2bOf2Gs9-b8QAAAAU] /index.php/Special:Contact Exception from line 71 of /app/mediawiki/includes/htmlform/fields/HTMLTextAreaField.php: OOUIHTMLForm does not support the 'cols' parameter for textareas Backtrace:

  1. 0 /app/mediawiki/includes/htmlform/HTMLFormField.php(583): HTMLTextAreaField->getInputOOUI(NULL)
  2. 1 /app/mediawiki/includes/htmlform/HTMLForm.php(1660): HTMLFormField->getOOUI(NULL)
  3. 2 /app/mediawiki/includes/htmlform/HTMLForm.php(1246): HTMLForm->displaySection(array, string)
  4. 3 /app/mediawiki/includes/htmlform/OOUIHTMLForm.php(246): HTMLForm->getBody()
  5. 4 /app/mediawiki/includes/htmlform/HTMLForm.php(1036): OOUIHTMLForm->getBody()
  6. 5 /app/mediawiki/includes/htmlform/HTMLForm.php(1016): HTMLForm->getHTML(boolean)
  7. 6 /app/mediawiki/includes/htmlform/HTMLForm.php(581): HTMLForm->displayForm(boolean)
  8. 7 /app/mediawiki/extensions/ContactPage/ContactPage_body.php(231): HTMLForm->show()
  9. 8 /app/mediawiki/includes/specialpage/SpecialPage.php(522): SpecialContact->execute(NULL)
  10. 9 /app/mediawiki/includes/specialpage/SpecialPageFactory.php(578): SpecialPage->run(NULL)
  11. 10 /app/mediawiki/includes/MediaWiki.php(287): SpecialPageFactory::executePath(Title, RequestContext)
  12. 11 /app/mediawiki/includes/MediaWiki.php(851): MediaWiki->performRequest()
  13. 12 /app/mediawiki/includes/MediaWiki.php(523): MediaWiki->main()
  14. 13 /app/mediawiki/index.php(43): MediaWiki->run()
  15. 14 {main}

// 'cols' => 80, fixes the issue

--Legaulph (talk) 13:09, 1 March 2018 (UTC)
Reply to "Internal Error"

Mail object returned error:Unknown error in PHP's mail() function.

1
103.17.220.110 (talkcontribs)

I've set everything up according to the installation instructions, but am getting the above error every time I try to send mail.

Reply to "Mail object returned error:Unknown error in PHP's mail() function."

Can't get footer contact link to work. Any idea?

6
Summary by Kghbln

Do not modify the code and provide the translations via the system messages specified. See docu.

Fredrilj (talkcontribs)

The footer link is closed in brackets and look like this: "⧼Kontakt⧽"

https://mydomain.com/wiki/⧼Spesial:Kontakt⧽

Because of this the link to the special contact page will not work. Any idea how to fix this?

This is my code in LocalSettings.php (input is translated to my language):

$wgHooks['SkinTemplateOutputPageBeforeExec'][] = function( $sk, &$tpl ) {
	$contactLink = Html::element( 'a', array( 'href' => $sk->msg( 'Spesial:Kontakt' )->escaped() ),
		$sk->msg( 'Kontakt' )->text() );
	$tpl->set( 'contact', $contactLink );
	$tpl->data['footerlinks']['places'][] = 'contact';
	return true;
};

Fredrilj (talk) 20:04, 1 April 2017 (UTC)

Kghbln (talkcontribs)

Do not do this. Take the code as is and add the translations via the system messages specified.

RadioSaigon (talkcontribs)

I have precisely the same issue on my recent install of Contact Form... the brackets as above enclose both the footer link and the URL. When clicked, MediaWiki tries to create the page of the full URL enclosed by the brackets.

I think the problem may be that I have not yet defined the:

  1. ... the URL of "Special:Contact" to system message MediaWiki:Contactpage-url and
  2. ... the label for "Special:Contact" to system message MediaWiki:Contactpage-label.

parameters... I don't know how or where. Would be very grateful for some direction.

RadioSaigon (talkcontribs)

Well, it's taken hours... but I've managed to figure out what was necessary, after several false starts. I hope this helps someone else:

DO NOT modify the code for your LocalSettings.php AT ALL. It goes in EXACTLY as displayed.

then...

Installation instructions:

  1. ... the URL of "Special:Contact" to system message MediaWiki:Contactpage-url and
  2. ... the label for "Special:Contact" to system message MediaWiki:Contactpage-label.

require you to go to: http://www.yourdomain.com/MediaWiki:Contactpage-url, create the page, which will contain only the URL to your Special:Contact page

Similarly, create the page http://www.yourdomain.com/MediaWiki:Contactpage-label on your wiki, containing only the text you desire for your footer link.

Job done. Bob's your Auntie.

Kghbln (talkcontribs)
Kghbln (talkcontribs)

Ah, I did not see your post before. Yes, great, good that it worked out and elaborating for other what to do in case of doubt.

It sends the copy but the message doesn't

1
MacedoEAF (talkcontribs)

Greetings!

My contact page sends the copy to the specified email but doesn't send the message to the receiver. I did use the config at the Extension:ContactPage. Do you have any ideia what's going on?

Best regards,

Edpo

Reply to "It sends the copy but the message doesn't"

How to add contact link to the mobile view?

5
BFeely (talkcontribs)

I just installed ContactPage on my website, and added the footer link using the provided instructions. It works fine in desktop view, but I can't find it in mobile view.

How would I go about adding the contact link to the mobile view, which uses the MobileFrontend extension?

Kghbln (talkcontribs)

That's a good question. I am in for learning about a solution ...

BDavis (WMF) (talkcontribs)
Kghbln (talkcontribs)

Thank you for the tip. Did not know this list existed. I just wrote to it explaining the issue. Keeping fingers crossed that someone knows a solution. Cheers

Kghbln (talkcontribs)

Admittedly I have not followed up to the thread on the mailing list yet. :(

Reply to "How to add contact link to the mobile view?"

FromAddress not sent

4
Summary by Kghbln

Add an e-mail address to 'SenderEmail' like e.g. 'SenderEmail' = 'info@example.org',

Karlpietsch (talkcontribs)

This extensions is configured to put the FromName or FromAddress into the email sent, not both, if FromName is not provided then it uses FromEmail instead, furthermore if the required option is set to true FromName is required and always sent instead so there is no way at all of getting the senders email address at all without overriding the output using hooks. If email address is required in the form it should be sent, contact messages without a way to reply are of not much use?

Cymaxtec (talkcontribs)

Hi Karlpietsch , I know it's being a long time, but how did you resolve this issue? I'm facing the same issue with no luck. Thanks! Regards.

Fredrilj (talkcontribs)

You have probably fixed this by now, but this is how I fixed it:

  1. Set "$wgUserEmailUseReplyTo = true;"
  2. Change "'SenderEmail' => null, // Defaults to $wgPasswordSender" to "SenderEmail' => 'myname@gmail.com', // Defaults to $wgPasswordSender", even if "myname@gmail.com" was the same as the email address I used for $wgPasswordSender. Otherwise the replay address would be the $wgPasswordSender and not the email address that the user wrote in the contact scheme.
Kghbln (talkcontribs)

Thank you for clarifying this!

This is how I got Gmail to work

2
Summary by Kghbln

See the post to this topic for the solution.

Fredrilj (talkcontribs)

Gmail refused to authenticate and the contact page served an error message when trying to send emails (something like this: "SMTP: Invalid response code received from server (code: 534, response...").

My solution:

  1. Allowing less secure apps to access your Gmail account. See instructions here: https://support.google.com/accounts/answer/6010255?hl=en
  2. Google have to allow your app/MediaWIki to use your own account. Log into your Gmail account. Go to https://accounts.google.com/DisplayUnlockCaptcha, then click continue, then within 10 min, try to send email again, and google will remember the application/MediaWiki and allow it to access your account (as long as you don't change your password).
  3. To get the SMTP to work I had to use "gmail.com" as my IDHost in the $wgSMTP setting.
  4. Set "$wgUserEmailUseReplyTo = true;"
  5. Change "'SenderEmail' => null, // Defaults to $wgPasswordSender" to "'SenderEmail' => 'myname@gmail.com', // Defaults to $wgPasswordSender", even if "myname@gmail.com" was the same as the email address I used for $wgPasswordSender. Otherwise the replay address would be the $wgPasswordSender and not the email address that the user wrote in the contact scheme.

I'm using an ordinary Gmail account, not G Suite (apps).

It took me some time to figure this out (and to find out that my host did not support sending emails through web applications), so hopefully this can help somebody. Fredrilj (talk) 20:10, 1 April 2017 (UTC)

Kghbln (talkcontribs)

Cool, thanks a lot for sharing this with us!

ContactPage input fields is a no show in MobileFrontend

1
Summary by Kghbln

See this topic and join the discussion there.

Fredrilj (talkcontribs)

The input fields is not showing, so it's not easy to see the fields when they blend in with the white background.

Will this extension be updated to support MobileFrontend? Fredrilj (talk) 20:55, 1 April 2017 (UTC)

Summary by Kghbln

'RecipientUser' must be specified.

BradLeeBH (talkcontribs)

Hi, I'm getting the following error message on Special:Contact DESPITE specifying a valid email in LocalSettings.php

No email address

This user has not specified a valid email address.

I'm using MW 1.25.2 with the master branch of ContactPage, (although 1.25 stable does the same thing).

Syntax I'm using is: 'SenderEmail' => 'admin (AT) smiliepedia.org',

NOTE: This *is* also the default $wgPasswordSender which also works for sending/receiving emails, just not with this extension.

Can you please help me fix this? Thanks, @BradLeeBH

Kghbln (talkcontribs)

Hmm, what happens when you set 'SenderEmail' => null,?

BradLeeBH (talkcontribs)

Same error. That is why I am so stumped.

I have the exact same email list in $wgPasswordSender and $wgEmergencyContact, and I am able to send and receive emails to and from that address through the normal wiki Special:EmailUser mechanism.

Kghbln (talkcontribs)

Something else must cause this issue. I just tested this on a MW 1.25.1 wiki and it is working fine: That's the LocalSettings.php for the particular wiki.

One other thing I can come up with right now: The user added to the "RecipientUser" parameter must have added and verified an e-mail for the whole setup to work.

Kghbln (talkcontribs)
BradLeeBH (talkcontribs)

Hi,

That was my problem. I had not added a RecipientUser, as I thought that having either adding a valid e-mail address to SenderEmail or using "null" would be sufficient.

As you have clearly explained however, it STILL requires the RecipientUser to be added.

Thanks

Kghbln (talkcontribs)

Great that things now work out cool for you!

Andreas Plank (talkcontribs)

I don't know, is https://phabricator.wikimedia.org/T124849 related to this?

$contactSender = new MailAddress(
  $config['SenderEmail'] ?: $wgPasswordSender,
  $config['SenderName']
);

Why if $config['SenderEmail'] is set then this setting is not used? Just a guess, that there is something disarranged

Andreas Plank (talkcontribs)

in line 407 from git commit 2014-01-29 it reads:

$csender = $wgContactSender ? $wgContactSender : $wgPasswordSender;

and a commit later on 2014-02-19 it reads:

$csender = $config['SenderEmail'] ?: $wgPasswordSender;

Why ? It seems like (German: Verschlimmbesserung) worsen the functioning, right? Or am I overlooking something?

Kghbln (talkcontribs)

In case this is related to the bug reported by infinite-dao which you linked it will be better to continue the discussion on phabricator since from experience this is the place there the programmers look at things if they do it at all.

Fatal error: Cannot access protected property ReCaptcha::$trigger in

1
Summary by Jackqbox

version confict

1.175.234.28 (talkcontribs)

Contact page

for logged users it works fine for anonymous users it fails error Fatal error: Cannot access protected property ReCaptcha::$trigger in /share/MD0_DATA/Web/VHost_qbox4u/conf/cbp/mwk/extensions/ContactPage/ContactPage_body.php on line 440

$wgWhitelistRead = array( xxxxxxx, "Special:Contact", "特殊:聯絡"); any suggestions?