Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#301 2007-08-17 18:54:55

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

Re: zem_contact_reborn 4.0.3.19 (old version)

I have a form in German (v4.0.3.17). It has special characters such as umlauts, etc. I’m finding that checkboxes that contain one or more special characters in the label get submitted as “No” even when they are checked. For example:

<txp:zem_contact_checkbox label="Unterspritzung der Harnröhre" />

If I encode the special characters, they submit correctly, but then in the resulting email the raw encodings appear. Any ideas?

Offline

#302 2007-08-17 19:36:15

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

Re: zem_contact_reborn 4.0.3.19 (old version)

alannie, please upgrade to zem_contact_reborn 4.0.3.20 and check if this problem occurs there as well. The example you gave should work and if not that’s a bug and I’d like to hear about it so I can fix it before the 4.0.3.20 version is officially released.

Offline

#303 2007-08-17 20:00:45

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

Re: zem_contact_reborn 4.0.3.19 (old version)

ruud, it works with 4.0.3.20 (after I changed status from “live” to “testing”), thanks very much!

Offline

#304 2007-08-19 22:41:01

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

Re: zem_contact_reborn 4.0.3.19 (old version)

ruud wrote:

$zem_contact_error contains all errors, including some you really do not want to ignore such as the those resulting from checking invalid utf-8 input, length limits and email address validation. You could add a callback event in the plugin code just before the errors are displayed to the user, hook a plugin into that and let it access the $zem_contact_error array there so it can be modified to fit your needs. That would be a minor edit for you to make.

Thanks for the tip. That’s more ambitious than what I have in mind, but could come in handy down the road.

I’ve found that I can get at the contents of the error array by hooking a plugin to the zemcontact.form callback event (the errors I’m interested in block the successful submission that precedes zemcontact.submit). I can use zem_contact_gTxt() to confirm the presence of a specific error message or messages in the array (such as form_used), then log the event to a file or send an e-mail to a site admin or something.

Though this all makes sense in my head, I haven’t had time to put it together yet. If you spot an obvious flaw in my logic, please let me know. Otherwise, I’ll pop back in if I run into trouble. Thanks again for your help.

Offline

#305 2007-08-20 08:36:35

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

Re: zem_contact_reborn 4.0.3.19 (old version)

That probably won’t work, because by the time zemcontact.form is triggered, you’re already past the point where the errors are evaluated. By that time the form + errors is printed again for the visitor to see. It would also mean you’d have to duplicate the code for creating and sending the email.

Offline

#306 2007-08-20 17:36:48

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

Re: zem_contact_reborn 4.0.3.19 (old version)

ruud wrote:

That probably won’t work, because by the time zemcontact.form is triggered, you’re already past the point where the errors are evaluated. By that time the form + errors is printed again for the visitor to see.

I’m not trying to prevent users from seeing errors, just trying to report selected errors to people who can do something about them. For example, an unusually high rate of empty required fields might indicate that usability improvements are needed. If the form keeps expiring, there may be a conflict with a caching plugin or a need to extend the lifespan of the nonce.

The concept for such a plugin isn’t to directly alter the user experience, but to inform the site’s developers and/or administrators of problems they need to address. It may be a couple of weeks before I can find the time to work on this, though.

It would also mean you’d have to duplicate the code for creating and sending the email.

Since the recipient address(es) will already be known, and the message content programmatically generated, the code for creating and sending an error notification would be fairly lean compared to ZCR. Unlike a public-facing mail form, there’s no user input to sanitize and test.

Offline

#307 2007-08-21 01:04:11

facho
Member
Registered: 2007-04-15
Posts: 64

Re: zem_contact_reborn 4.0.3.19 (old version)

I have recently installed TXP on my work machine as I am building a site that sits on our internal network (intranet). I’ve installed the plug-in, activated the plugins (Lang/Reborn), but I am haivng trouble sending mail. I am using the following tag to generate the form:

<txp:zem_contact to=“ommitingmyactualadress@xyz.com” />

In debug mode, I get the following error:
tag_error <txp:zem_contact to=“ommitingmyactualadress@xyz.com” /> -> Warning: mail() [function.mail]: Failed to connect to mailserver at “localhost” port 25, verify your “SMTP” and “smtp_port” setting in php.ini or use ini_set() on line 230
C:\wamp\www\textpattern\lib\txplib_misc.php(534) : eval()’d code:230 mail()
C:\wamp\www\textpattern\publish.php:963 zem_contact()
processTags()
C:\wamp\www\textpattern\publish.php:922 preg_replace_callback()
C:\wamp\www\textpattern\publish.php:456 parse()
C:\wamp\www\index.php:39 textpattern()

Any idea what’s going on and how to resolve it?

Offline

#308 2007-08-21 03:49:21

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: zem_contact_reborn 4.0.3.19 (old version)

well..do you actually have smtp service running on your computer?

Offline

#309 2007-08-23 14:09:20

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

Re: zem_contact_reborn 4.0.3.19 (old version)

A new version of zem_contact_reborn was released: version 4.0.3.20
Everyone please upgrade and move discussion to this new topic

Offline

Board footer

Powered by FluxBB