2012-03-13 10:04:35

Gocom
Developer
omega
Real name: Jukka Svahn
Website

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.


Rah-plugins | What? I’m a little confused… again :-) <txp:is_god />

Online

 

2012-03-14 12:27:54

lonelytraveller
Member
gamma
Real name: Caterina
From: Firenze, Italy
Known languages: ITA, EN, FR

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

 

2012-03-14 19:23:48

ruud
Developer emeritus
omega
Real name: Ruud van Melick
From: a galaxy far far away
Known languages: li,nl,en,(de)
Website

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

 

2012-03-14 20:33:14

lonelytraveller
Member
gamma
Real name: Caterina
From: Firenze, Italy
Known languages: ITA, EN, FR

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

 

2012-03-14 22:29:53

ruud
Developer emeritus
omega
Real name: Ruud van Melick
From: a galaxy far far away
Known languages: li,nl,en,(de)
Website

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

 

2012-03-15 12:29:54

lonelytraveller
Member
gamma
Real name: Caterina
From: Firenze, Italy
Known languages: ITA, EN, FR

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

 

2012-03-15 16:49:54

alannie
Member
zêta
From: New York, USA
Known languages: en, ASL

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

 

2012-03-15 22:56:58

ruud
Developer emeritus
omega
Real name: Ruud van Melick
From: a galaxy far far away
Known languages: li,nl,en,(de)
Website

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

 

2012-03-16 06:30:19

[Axel]
Member
gamma
Real name: Axel
From: Switzerland/Denmark
Known languages: dk, de, en
Website

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.

Offline

 

2012-03-16 11:55:18

gfdesign
Member
thêta
Real name: Fernando
From: Argentina
Known languages: es, en

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

 

Powered by FluxBB