Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1411 2014-02-19 23:23:11

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,466
Website GitHub

Re: zem_contact_reborn 4.0.3.20

dana wrote #279099:

var_dump($_POST) comes up as an empty array, which makes me think the form doesn’t submit at all. :/

That would be my prognosis too, especially since direct sending via the mail() function worked.

A few further things you can try:

  • Look in your Textpattern Admin->Diagnostics panel for any warnings that might have an impact.
  • Check your server for any error_log files that might have been generated as a by-product of the send process.
  • Nose around your server configuration / php.ini. I’ve seen it before where something like suhosinwas enabled on the host and it was trashing POST data (though that thread is specific to long post data streams and yours isn’t exactly gargantuan, it might be worth checking anyway). phpinfo() can be a potential mine of information in these situations.
  • Set up any bog-standard HTML form with a single <input name="some-test" /> tag and a submit button on a Page/Form. If you set the <form> tag with action="" so it submits to the same page and stuff the <txp:php>dmp($_POST);</txp:php> at the top of the same Page/Form, that’ll tell you if your server is stripping POST data somewhere along the line. If that’s fine, it’s likely something with the plugin or its setup so you can go back to basics, with just a single input and see if that gets sent, then build up from there.

Short of that, I’m fresh out of ideas at the moment, sorry.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#1412 2014-02-20 01:33:57

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: zem_contact_reborn 4.0.3.20

After moving sites from TextDrive to a Gandi VPS recently I found out Textpattern could not send user mails and the contact forms (ZCR) didn’t work either. Turns out I had to install/enable Postfix on the VPS. Probably not related to your problem, but might be helpful to someone else especially now that TXD is going down the drain.

Offline

#1413 2014-02-20 09:20:18

dana
New Member
Registered: 2014-02-19
Posts: 6

Re: zem_contact_reborn 4.0.3.20

I don’t use TXD nor VPS, I’m starting from scratch. Thanks for the suggestion though, maybe someone else has that problem. :)

Bloke wrote #279114:

  • Look in your Textpattern Admin->Diagnostics panel for any warnings that might have an impact.
  • Check your server for any error_log files that might have been generated as a by-product of the send process.
  • Nose around your server configuration / php.ini. I’ve seen it before where something like suhosinwas enabled on the host and it was trashing POST data (though that thread is specific to long post data streams and yours isn’t exactly gargantuan, it might be worth checking anyway). phpinfo() can be a potential mine of information in these situations.

I found no warnings except some notice which PHP functions have been turned off on my server. The functions are: escapeshellcmd, proc_close, proc_nice, proc_get_status, proc_terminate, readlink, pfsockopen, openlog, syslog, putenv, pcntl_exec, pcntl_fork, pcntl_signal, pcntl_waitpid, pcntl_wexitstatus, pcntl_wifexited, pcntl_wifsignaled, pcntl_wifstopped, pcntl_wstopsig, pcntl_wtermsig, socket_accept, socket_bind, socket_create, socket_create_listen, socket_listen, socket_create_pair

I can attach the whole diagnostic log if needed.

I’ve had no problems with using forms on my website before (was using WebsiteBaker for a long time, then Wordpress). My site has been online for over 4 years.

  • Set up any bog-standard HTML form with a single <input name="some-test" /> tag and a submit button on a Page/Form. If you set the <form> tag with action="" so it submits to the same page and stuff the <txp:php>dmp($_POST);</txp:php> at the top of the same Page/Form, that’ll tell you if your server is stripping POST data somewhere along the line. If that’s fine, it’s likely something with the plugin or its setup so you can go back to basics, with just a single input and see if that gets sent, then build up from there.

I’ve tried inserting this HTML form into my form:

<pre><txp:php>var_dump($_POST); echo $_POST['text'];</txp:php></pre>   
    <form action="" method="post">
      <input type="text" name="text" />
      <input type="submit"/>
    </form>

$_POST was still empty. I had a sudden brainwave and decided to scrape my htaccess. That somehow solved it. :D Thank you everyone for your help! :)

Last edited by dana (2014-02-20 12:48:57)

Offline

#1414 2014-03-23 00:25:01

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,260
Website Mastodon

Re: zem_contact_reborn 4.0.3.20

how do we prevent the insertion of html in the Contact Message form? We are starting to get spam via the form


…. texted postive

Offline

#1415 2014-03-23 00:43:43

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: zem_contact_reborn 4.0.3.20

bici wrote #279896:

how do we prevent the insertion of html in the Contact Message form? We are starting to get spam via the form

adi_contact is one option.

Offline

#1416 2014-03-24 01:08:18

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,260
Website Mastodon

Re: zem_contact_reborn 4.0.3.20

gomedia wrote #279897:

adi_contact is one option.

that does the trick. thanks


…. texted postive

Offline

#1417 2014-03-31 11:24:22

castanet
Member
From: Oxford
Registered: 2005-03-19
Posts: 97

Re: zem_contact_reborn 4.0.3.20

I have a form returning a ‘Sorry, unable to send email’ message for me in the UK and a friend in Spain, but when I use a proxy server (kproxy.com) the form works OK. The hosting provider says server logs show “no error message or any trouble” and suggest it is something connected with the script. I’m doubtful but can anyone suggest a way forward, please?

Offline

#1418 2014-04-08 07:45:08

planeth
Plugin Author
From: Nantes, France
Registered: 2009-03-19
Posts: 240
Website GitHub Mastodon

Re: zem_contact_reborn 4.0.3.20

Just for info another french textapack translated from Bloke’s :

#@common
#@language fr-fr
zem_contact_checkbox => Case à cocher
zem_contact_contact => Contact
zem_contact_email => Email
zem_contact_email_subject => {site} > Demande
zem_contact_email_thanks => Merci, votre message a bien été envoyé.
zem_contact_field_missing => Champ obligatoire &#8220;<strong>{field}</strong>&#8221; manquant
zem_contact_form_expired => Le délai du formulaire vient d'expirer. Veuillez recommencer.
zem_contact_form_used => Le formulaire a déjà été soumis. Veuillez en remplir un nouveau.
zem_contact_general_inquiry => Demande d'ordre général
zem_contact_invalid_email => &#8220;<strong>{email}</strong>&#8221; n'est pas une adresse email valide
zem_contact_invalid_host => &#8220;<strong>{host}</strong>&#8221; n'est pas correctement rédigé
zem_contact_invalid_utf8 => &#8220;<strong>{field}</strong>&#8221; contient des caractères invalides
zem_contact_invalid_value => cette valeur : &#8220;<strong>{value}</strong>&#8221; n'est pas correcte pour &#8220;<strong>{field}</strong>&#8221;.
zem_contact_mail_sorry => Désolé, impossible d'envoyer votre message dans l'immédiat.
zem_contact_maxval_warning => &#8220;<strong>{field}</strong>&#8221; ne peux pas être plus grand que {value}.
zem_contact_max_warning => &#8220;<strong>{field}</strong>&#8221; dépasse {value} caractères.
zem_contact_message => Message
zem_contact_minval_warning => &#8220;<strong>{field}</strong>&#8221; doit être au moins {value}.
zem_contact_min_warning => &#8220;<strong>{field}</strong>&#8221; doit contenir au moins {value} caractères.
zem_contact_name => Nom
zem_contact_option => Option
zem_contact_radio => Bouton radio
zem_contact_pattern_warning => &#8220;<strong>{field}</strong>&#8221; doit correspondre à ce modèle {value}.
zem_contact_recipient => Destinataire
zem_contact_refresh => Cliquez sur ce lien si la page ne se rafraîchissait pas automatiquement.
zem_contact_secret => Secret
zem_contact_send => Envoyer
zem_contact_send_article => Envoyer l'article
zem_contact_spam => Nous refusons catégoriquement les spam. Bien à vous.
zem_contact_text => Texte
zem_contact_to_missing => l'adresse mail &#8220;<strong>To</strong>&#8221; est manquante.

Offline

#1419 2014-05-10 20:02:42

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 816
Website

Re: zem_contact_reborn 4.0.3.20

This Txp tag is in an article: <txp:output_form form="form_deelname" />

This is the form:

<txp:zem_contact to="some@emailadres.nl" label="Ja, ik wil graag deelnemen aan deze activiteit" copysender="1" thanks="Het bericht is verstuurd. Dank u!" subject="form_deelname">
<txp:zem_contact_secret value="<txp:custom_field name="activiteit" />" />
<txp:zem_contact_text label="Naam:" />
<txp:zem_contact_email label="E-mailadres:" />
<txp:zem_contact_submit label="">Verzenden</txp:zem_contact_submit>
</txp:zem_contact>

This is the page > living-heart.nl/test (form is at the end of the article)

In Txp the custom_field ‘activiteit’ of that article says ‘geld en werk’.

Is <txp:zem_contact_secret value="<txp:custom_field name="activiteit" />" /> working?

No … it doesn’t. What is it I’m doing wrong?

Offline

#1420 2014-05-10 20:15:48

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: zem_contact_reborn 4.0.3.20

Mind your quotes ;)

<txp:zem_contact_secret value='<txp:custom_field name="activiteit" />' />

(http://www.textpattern.net/wiki/index.php?title=Parsing_Tag_Attributes)

Offline

#1421 2014-05-10 21:20:04

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 816
Website

Re: zem_contact_reborn 4.0.3.20

O boy, I did it again … :$

Offline

#1422 2014-05-14 15:55:23

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 816
Website

Re: zem_contact_reborn 4.0.3.20

<txp:zem_contact to="info@example.com" label='Ja, ik wil graag deelnemen aan: <txp:custom_field name="activiteit" />' copysender="1" thanks="Het bericht is verstuurd. Dank u!" subject="form_deelname">
<txp:hide><txp:zem_contact_text label="Omschrijving:" /></txp:hide>
<txp:zem_contact_secret label="Activiteit" value='<txp:custom_field name="activiteit" />' />
<txp:zem_contact_text label="Mijn naam is ..." />
<txp:zem_contact_email label="Mijn e-mailadres is ..." />
<txp:zem_contact_submit label="">Verzenden</txp:zem_contact_submit>
</txp:zem_contact>

… is rendered as > screendump

Is it possible to put <txp:custom_field name="activiteit" /> always on a new line? How?

{EDIT: Removed real email addresses – Uli}

Last edited by RedFox (2014-05-14 15:56:07)

Offline

#1423 2014-05-14 20:58:19

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,316

Re: zem_contact_reborn 4.0.3.20

You could try something like

<txp:rah_replace from=":" to=":<br/>">
<txp:zem_contact to="info@example.com" label='Ja, ik wil graag deelnemen aan:<txp:custom_field name="activiteit" />' copysender="1" thanks="Het bericht is verstuurd. Dank u!" subject="form_deelname">
<txp:hide><txp:zem_contact_text label="Omschrijving:" /></txp:hide>
<txp:zem_contact_secret label="Activiteit" value='<txp:custom_field name="activiteit" />' />
<txp:zem_contact_text label="Mijn naam is ..." />
<txp:zem_contact_email label="Mijn e-mailadres is ..." />
<txp:zem_contact_submit label="">Verzenden</txp:zem_contact_submit>
</txp:zem_contact>
</txp:rah_replace>

In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#1424 2014-05-15 13:50:00

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 816
Website

Re: zem_contact_reborn 4.0.3.20

Uli, super … thanks!

Offline

#1425 2014-05-21 08:00:11

element
Member
Registered: 2009-11-18
Posts: 99

Re: zem_contact_reborn 4.0.3.20

Is it possible to send the output of a contact form to 2 email addresses simultaneously?

Offline

Board footer

Powered by FluxBB