You are not logged in.
This is one of my plans to modify the plugin, allowing for the use of replacement variables as in
smdplugins 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.
Rah-plugins | What? I’m a little confused… again :-)
Hi! I’ve just upgraded to TXP 4.4.1 a website containing a contact form built using zem_contact_reborn (22.214.171.124) + zem_contact_lang 126.96.36.199-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="firstname.lastname@example.org" > <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>
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)
@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).
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?
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.
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.
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)
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?
^^ 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.
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.
Could I add an CCO field?
I’d like to have in my contact form a hidden receiver.
Is it possible?