Extension talk:ContactPage

Jump to navigation Jump to search

About this board

previous talk on this page


146.52.180.156 (talkcontribs)

But when I remove 'cols' -> 80

then I do not get this exeption. I removed it because first error line telling me that 'cols' it not supported.

Note that wiki page to this extension uses this parameter, which seems to be wrong.

[d380fcece582b274f56e6755] /index.php/Spezial:Kontakt Exception from line 71 of /var/www_mediawiki/includes/htmlform/fields/HTMLTextAreaField.php: OOUIHTMLForm does not support the 'cols' parameter for textareas

Backtrace:

#0 /var/www_mediawiki/includes/htmlform/HTMLFormField.php(583): HTMLTextAreaField->getInputOOUI(NULL)

#1 /var/www_mediawiki/includes/htmlform/HTMLForm.php(1660): HTMLFormField->getOOUI(NULL)

#2 /var/www_mediawiki/includes/htmlform/HTMLForm.php(1246): HTMLForm->displaySection(array, string)

#3 /var/www_mediawiki/includes/htmlform/OOUIHTMLForm.php(246): HTMLForm->getBody()

#4 /var/www_mediawiki/includes/htmlform/HTMLForm.php(1036): OOUIHTMLForm->getBody()

#5 /var/www_mediawiki/includes/htmlform/HTMLForm.php(1016): HTMLForm->getHTML(boolean)

#6 /var/www_mediawiki/includes/htmlform/HTMLForm.php(581): HTMLForm->displayForm(boolean)

#7 /var/www_mediawiki/extensions/ContactPage/ContactPage_body.php(230): HTMLForm->show()

#8 /var/www_mediawiki/includes/specialpage/SpecialPage.php(522): SpecialContact->execute(NULL)

#9 /var/www_mediawiki/includes/specialpage/SpecialPageFactory.php(578): SpecialPage->run(NULL)

#10 /var/www_mediawiki/includes/MediaWiki.php(287): SpecialPageFactory::executePath(Title, RequestContext)

#11 /var/www_mediawiki/includes/MediaWiki.php(851): MediaWiki->performRequest()

#12 /var/www_mediawiki/includes/MediaWiki.php(523): MediaWiki->main()

#13 /var/www_mediawiki/index.php(43): MediaWiki->run()

#14 {main}

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)
96.51.133.255 (talkcontribs)
Lennythelabrat (talkcontribs)

Sorry, hadn't meant to do that anonymously. I'm having this problem as well, where do I set the //'cols'=>80 to fix this issue? Is that in LocalSettings.php? Thank you for any help that you can provide. - Lennythelabrat

Lennythelabrat (talkcontribs)

Ah! Yes, inside of the LocalSettings.php where this is first defined! Sorry to pester.

70.72.46.25 (talkcontribs)

Hi, I am trying to use this extension with a wiki that has a mobile version. It works well on the main website, but the minimum width of the contact page is too large to show up properly on the mobile site. I have tried and failed to fix it with added css. Any thoughts? Thanks.

BDavis (WMF) (talkcontribs)

You could try setting 'DisplayFormat' => 'vform' and see if that form layout is either narrow enough for your mobile display or easier to adjust with custom css added via RLStyleModules.

Stefahn (talkcontribs)

3 years later, but same problem.
The contact form uses a table (why?) and thus it's not responsive (example).

Can the extension be re-written to use divs instead of a table?

BDavis (WMF) (talkcontribs)
Can the extension be re-written to use divs instead of a table?

It could be yes. Someone would need to design the new HTML and CSS that would largely keep the default desktop look and feel the same while making things responsive for smaller viewports. The ContactPage extension is not really under active development by anyone as far as I know, so there really is not an individual or team to ask to prioritize this work. I am sure code review help could be found if anyone volunteered their time to try and make a patch for the layout changes.

Reply to "Minimum width constraint"

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)