Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-09-10 17:44:30

dingoboy
Member
Registered: 2006-09-07
Posts: 48

zem_contact - problems

Sorry if this question is a re-post, but I couldn’t find any answers to it.

My problem: I installed zem_contact, and it spits out the form perfectly, but when I submit the content, I get the error: “Form expired, please try again.”.

My code (simply copy/pasted from the help file):
<code>
<txp:zem_contact mailto=“my@email.com”>
<txp:zem_contact_email /><br />
<txp:zem_contact_text label=“Phone” min=7 /><br />
<txp:zem_contact_textarea label=“Enquiry” /><br />
<txp:zem_contact_submit label=“Enquire” />
</txp:zem_contact>
</code>

I noted one suspecious thing, looking at the HTML source code generated by the plugin. In the <form> the action attribute was set to action="/contact" (URL to the page containing the plugin form). Is that correct?

Please help!

Last edited by dingoboy (2006-09-10 17:48:07)

Offline

#2 2006-09-10 17:56:00

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: zem_contact - problems

Are you using some kind of caching solution or did you wait longer than 10 minutes before submitting the form?

The ‘action=”/contact”’ is correct.

Try the following: load the contact page, view the HTML source of the page. Look for the word ‘nonce’ followed by a long cryptic code. Write down that code.
Now close your browser, go to the contact page. Hit reload to make sure it loads a fresh copy. Then look at the HTML source again. Is the cryptic ‘nonce’ code the same as the first time? If so, there’s some kind of caching in place that prevents zem_contact from working properly. The zem_contact page should be excluded from caching.

Last edited by ruud (2006-09-10 18:01:03)

Offline

#3 2006-09-10 18:01:08

dingoboy
Member
Registered: 2006-09-07
Posts: 48

Re: zem_contact - problems

As far as I know, there is no special caching solution set up — I’m running a basic Textpattern (current edition) install, with no mods or such things.

The error occurs no matter how long you wait. 10 seconds or 10 minutes…

Offline

#4 2006-09-10 18:11:11

dingoboy
Member
Registered: 2006-09-07
Posts: 48

Re: zem_contact - problems

Weird, now it seems to work (but doesn’t quite), though I haven’t changed a thing.

When I submit, it returns: “Email enquiry sent”.
But I don’t receive the form content or anything on my e-mail still, now an hour later! :-/

Ruud: The hash code is different every time I load the page…

Last edited by dingoboy (2006-09-10 18:47:52)

Offline

#5 2006-09-10 19:40:29

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

Re: zem_contact - problems

dingoboy wrote:

<txp:zem_contact mailto="myemail.com”>@

Er… you did change that into your real email address, didn’t you? ;)

Otherwise, someone once had the same problem, but that was with zem_contact_reborn, not the original zem_contact. So I don’t know if the solution can be the same.

Offline

#6 2006-09-11 08:00:26

dingoboy
Member
Registered: 2006-09-07
Posts: 48

Re: zem_contact - problems

Of course I changed the mailto address to my own e-mail. I also tried to set the mailfrom attribute, but yet nothing happens: The plugin still returns “Email enquiry sent” but no e-mail is received (or even sent??).

This is the case no matter the txp form. I also tried to simplify it: <txp:zem_contact mailto="mymailmydomain.com” mailfrom=“robot@mydomain.com” />@
Still no cigar…

I am positive that my host supports this mail() stuff.

Any suggestions, please?

Last edited by dingoboy (2006-09-11 08:10:26)

Offline

#7 2006-09-11 09:47:09

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: zem_contact - problems

So, just to be 100% sure… if you create a file called mail.php on your website with the following contents: <code><?php mail(‘mymail@mydomain.com’, ‘test’, ‘test’); ?></code> and then open that page using your browser, does it send an email?

And if that works, does this also send an email?: <code><?php mail(‘mymail@mydomain.com’, ‘test’, ‘test’, ‘From: <robot@mydomain.com>’); ?></code>

Last edited by ruud (2006-09-11 09:57:50)

Offline

#8 2006-09-11 10:57:33

dingoboy
Member
Registered: 2006-09-07
Posts: 48

Re: zem_contact - problems

ruud: Both of your scripts work flawlessly.

I also tried out an installation of formmail.php (http://www.tectite.com/). This script also works, but I don’t like this solution – I want a nice Textpattern plugin, hence this thread. ;-)

Conclusion: Apparently this is not a server problem.

However – in spite of mail() and my hosts sendmail working as a charm – zem_contact fails to send the content of the forms to my e-mail.

But why? Help, Lord! :-)

Last edited by dingoboy (2006-09-11 11:00:29)

Offline

#9 2006-09-11 11:23:19

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: zem_contact - problems

Hmm… perhaps try the zem_contact_reborn plugin instead of zem_contact?
Doesn’t really fix the problem, but it may be a faster way to work around it.

Offline

#10 2006-09-11 13:34:48

dingoboy
Member
Registered: 2006-09-07
Posts: 48

Re: zem_contact - problems

I’m having trouble installing zem_contact_reborn, (because the server is running PHP safe mode?), so I’d rather just fix the problem with zem_contact.

I’ve looked through the plugin’s code, and everything looks just fine to me, and as stated before; I get no error messages, so something FISHY is going on.

Hmm… Now it turns out, I’m also having trouble making zem_contact use a predefined HTML form via the form="contactform" attribute. The form contactform is saved as misc..

Sigh

Last edited by dingoboy (2006-09-11 13:44:01)

Offline

#11 2006-09-12 15:23:27

dingoboy
Member
Registered: 2006-09-07
Posts: 48

Re: zem_contact - problems

Oh no… All this turned out to be a problem with my webhosts anti-spam policy, NOT stated on their website. :-S

Luckily zem_contact works fine after all. Thanks for your help, everyone.

Offline

#12 2006-09-19 15:38:10

Ray
Member
Registered: 2004-03-02
Posts: 159

Re: zem_contact - problems

Just found out about the same problem dingoboy is experiencing on a site hosted with webcorelabs.com. Tried all the above suggestions with no luck.

Offline

Board footer

Powered by FluxBB