Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1141 2012-03-13 10:04:35
Re: zem_contact_reborn 4.0.3.20
aslsw66 wrote:
This is one of my plans to modify the plugin, allowing for the use of replacement variables as in
smd
plugins and a form for the email template. But I must admit that it’s low on my list of priorities.
Please don’t use replacement tags, but Textpattern own tag parser. If you run content with two separate parsers, you will have security nightmare in your hands.
Offline
#1142 2012-03-14 12:27:54
- lonelytraveller
- Member
- From: Firenze, Italy
- Registered: 2008-04-04
- Posts: 45
Re: zem_contact_reborn 4.0.3.20
Hi! I’ve just upgraded to TXP 4.4.1 a website containing a contact form built using zem_contact_reborn (4.0.3.20) + zem_contact_lang 4.0.3.6-ML
The website itself uses the latest version of MLP. Everything works fine after the upgrade, except the form: everytime I try to send a message I get a “form expired” error (in the corresponding language) and the message is not sent.
I’m not using any plug-in like asy_jpcache, as suggested in some previous thread, and the site is still on the same server as before.
I’m using this technique to make the form work with an Ajax call.
I’ve checked with Firebug and there doesn’t seem to be any error with the ajax call. If I test the same code on a local MAMP install, I don’t get the “form expired” error, but the message is not sent either.
I’ve never had such a problem with this plug-in and I’d be happy if someone could point me to the right direction. This is the code I’m using to generate my form, where ##some-text## are MLP language snippets.
<txp:zem_contact to="myaddress@mywebsite.ext" >
<txp:zem_contact_email name="email" label="##tuo-indirizzo-email##" required="0" />
<txp:zem_contact_text label="##dates##" name="start_date" required="0" />
<div style="display: none;">
<img id="calImg" src="<txp:site_url />img/calendar.png" alt="Popup" class="trigger">
</div>
<txp:zem_contact_select label="##Label##" list=",Option1, > ##sub-option## A, > ##sub-option## B, > ##sub-option## C, Option2, Option3, Option4" required="0"/><br/><br/>
<txp:zem_contact_textarea label="##tuo-messaggio##" required="0"/>
<txp:zem_contact_submit label="##invia##" />
</txp:zem_contact>
Edit
I tried to use the same contact form in a different blank template (no Ajax calls, nothing but the form) and I still get the “form expired” message and the email is not sent.
When I try to send the message using Ajax, Firebug displays a ’200 OK’ response in the consolle, but only a few data are sent (less than 1Kb) and I don’t receive an email. Headers are set to expire 10minutes later, thus respecting the plugin settings.
So it definitely looks like an issue with ZCR, probably something went wrong with the upgrade?
Last edited by lonelytraveller (2012-03-14 17:32:06)
Offline
#1143 2012-03-14 19:23:48
Re: zem_contact_reborn 4.0.3.20
@Caterina: The ZCR form has a hidden field called “zem_contact_nonce”, which contains a value. This value should appear in the txp_discuss_nonce table with an issue_time that is valid and the “used” column should not be 1. Can you verify that this is the case? Because that’s how ZCR checks if the form has expired (issue_time) or has been used (used column set to 1).
Offline
#1144 2012-03-14 20:33:14
- lonelytraveller
- Member
- From: Firenze, Italy
- Registered: 2008-04-04
- Posts: 45
Re: zem_contact_reborn 4.0.3.20
Hi Ruud,
thanks for your suggestion. There must be something wrong with my “txp_discuss_nonce” table, because it is empty, while the same table on the local db has valid values.
Also the same table on my old db (I’ve kept a copy of the old install for testing purposes and ZCR works) has got several rows, and each one have a valid issue_time value and “used” value is set to 0.
How can I fix the problem? Maybe I forgot some file in the update?
Offline
#1145 2012-03-14 22:29:53
Re: zem_contact_reborn 4.0.3.20
Try restoring the table from the working database to the non-working database.
Check the diagnostics tab in TXP to check if all the TXP files have the correct checksum (= up-to-date).
And check if article comments work on the “non-working” install, because they use the same table.
Offline
#1146 2012-03-15 12:29:54
- lonelytraveller
- Member
- From: Firenze, Italy
- Registered: 2008-04-04
- Posts: 45
Re: zem_contact_reborn 4.0.3.20
Thanks Ruud, I tried to restore the table and all I got was an error from PhpMyAdmin, apparently I don’t have enough privileges for inserting data into the table. Probably that’s reason why ZCR can’t store any value in the txp_discuss_nonce table.
I’m trying to solve the problem with the host, thanks for explaining how ZCR works, I wouldn’t have found the solution by myself.
——
Edit
The permission problems with the db caused the issue with ZCR: just in case someone is experiencing the same kind of problems, my db exceeded the max size set by the hosting service, so no more data could be inserted. I just allocated more space to the db and ZCR is working.
Last edited by lonelytraveller (2012-03-15 13:59:17)
Offline
#1147 2012-03-15 16:49:54
- alannie
- Member
- From: Minnesota, USA
- Registered: 2005-09-15
- Posts: 150
Re: zem_contact_reborn 4.0.3.20
I have a very long form that I’d like to split up and spread out over several pages. For example, Step 1: General Information, Step 2: Service Requirements, Step 3: Billing Information. Yet I don’t want three separate emails sent for each visitor. Is it possible to have zem_contact_reborn collect data from all three steps in a single email?
Would something like this jQuery solution play nice with zem_contact_reborn?
Offline
#1148 2012-03-15 22:56:58
Re: zem_contact_reborn 4.0.3.20
^^ that’ll work as long as the user doesn’t make any mistakes, but if the user input is invalid and you don’t check this before submitting the form, what will happen then. It’s not impossible to do this, but it’ll take more work to deal with handling errors in the imput.
Offline
#1149 2012-03-16 06:30:19
Re: zem_contact_reborn 4.0.3.20
I think it should work, because it still is a one page form, so nothing gets submitted before the final step (therefore the server side error handling would work i suppose). The used jQuery code is validating the parts of the form on the client side too.
You should give it a try.
Greetz [Axel]
Offline
#1150 2012-03-16 11:55:18
- gfdesign
- Member
- From: Argentina
- Registered: 2009-04-20
- Posts: 401
Re: zem_contact_reborn 4.0.3.20
Dears
Could I add an CCO field?
I’d like to have in my contact form a hidden receiver.
Is it possible?
Thanks
Offline
#1151 2012-03-16 18:02:11
Re: zem_contact_reborn 4.0.3.20
Axel wrote: (btw, Axel, when quoting your name, Textile decides to get rid of you ;)
I think it should work, because it still is a one page form, so nothing gets submitted before the final step (therefore the server side error handling would work i suppose). The used jQuery code is validating the parts of the form on the client side too.
The main problem (I think) is in dealing with server-side error handling. What if you submit the form and ZCR says there’s something wrong in a form field in step 2? Ideally, I think the visitor should see step two with an error message that indicates what’s wrong. So you’d need to use javascipt to read the server-side errors (which are returned in the HTML code) and use that information to properly display the form. Most things can be checked on the client side, to avoid server-side errors… it’s mainly the email address that can’t really be checked without actually doing DNS lookups etc.
gfdesign wrote:
Could I add an CCO field?
I’d like to have in my contact form a hidden receiver.
Is it possible?
If you mean a BCC field, edit the plugin, find the line that reads $headers = 'From: '.$from.
and add just below: $sep.'Bcc: <email address>'.
Offline
#1152 2012-03-20 08:47:53
Re: zem_contact_reborn 4.0.3.20
I’ve got ZCR installed on a website I’m working on. Everything seems to work fine, the thanks page appears when I send messages using the form, but I don’t receive any messages in my inbox when I tested it. Can someone help out here?
The form is used here: http://www.rockyourstage.nl/contact/
Edit: I was too early, fixed it..
Edit: Didn’t fix it. Somehow if I send the messages to my hotmail-account it works, but if I try other emails it doesn’t. (It’s not in the spambox either.) Help?
Last edited by Mark (2012-03-21 10:19:29)
Offline