Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#91 2007-03-21 17:27:00

sugoo
Member
Registered: 2006-05-29
Posts: 20

Re: zem_contact_reborn 4.0.3.19 (old version)

sorry, guys… I did some googling and found the following fix, which seems to have done it:

http://urbangiraffe.com/2005/08/20/mysterious-406-error/

Last edited by sugoo (2007-03-21 17:27:27)

Offline

#92 2007-03-25 10:37:52

theturninggate
Member
Registered: 2004-11-07
Posts: 185
Website

Re: zem_contact_reborn 4.0.3.19 (old version)

What are the server requirements to make this thing work. I have a site hosted on a Linux box, running Apache, but it’s a new setup and the host is inexperienced in Linux. When I use the contact form here, it says the message is sent, but nothing shows up at the destination email address. It’s been more than 24 hours. I suspect something is amiss with the server configuration. What should the host have enabled for this to work?

Thanks,
theturninggate

Offline

#93 2007-03-25 12:09:53

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)

Try setting the ‘from’ attribute in the ‘zem_contact’ tag to your own mail address. Some mailservers block sender addresses that are outside domains hosted on the server. Anything other than that should be investigated by the hosting company (for example by looking at the mail server logs). Normally, just being able to send email is enough for ZCR to function; nothing special is needed.

Offline

#94 2007-03-25 13:06:28

redcrew
Member
Registered: 2007-03-23
Posts: 16

Re: zem_contact_reborn 4.0.3.19 (old version)

I’m a new Textpattern user. I set up zem_contact_reborn on the website, but I’m having an issue with the redirect to another URL option on the form.

When I specify the URL (in this example, the about page), the contact form is redirected correctly to the about page. But the URL in the address bar of the browser shows the following:

www.mysite.com/about/#zcr1aa5bb6a7cde70b329101f55221e3759

Clean URLs are showing for all the pages on the website, but when I use the redirect option in the form, the additional text appears in the browser address. Suggestions on what I can do to remove it?

Last edited by redcrew (2007-03-25 13:09:39)

Offline

#95 2007-03-25 15:16:01

tranquillo
Archived Plugin Author
Registered: 2005-03-07
Posts: 127
Website

Re: zem_contact_reborn 4.0.3.19 (old version)

What is the purpose of the line:

“else $atts[$key] = intval($atts[$key]);”

in zem_contact_lAtts?

It’s causing a problem with zem_contact_email and a new function, I try to implement that returns zem_contact_select the same way as zem_contact_email returns zem_contact_text. If I set required=“0”, this attribute is recognized as set and not as unset (i.e. == false), therefore the email is always required.

Or am I doing something completely wrong?

Offline

#96 2007-03-25 15:40:13

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)

Tranquillo, that’s not what’s causing problems, but a few lines above, the if/elseif statements that compare to yes/no, those should have === instead of ==. Will be fixed in the next version.

Redcrew, which browser are you using?

Last edited by ruud (2007-03-25 15:48:59)

Offline

#97 2007-03-25 16:49:05

redcrew
Member
Registered: 2007-03-23
Posts: 16

Re: zem_contact_reborn 4.0.3.19 (old version)

I’m using Firefox 2.0.0.2 under Windows XP Service Pack 2.
Whoops! correction, it was just updated this weekend. It’s Firefox 2.0.0.3.

Last edited by redcrew (2007-03-25 16:49:52)

Offline

#98 2007-03-25 16:59:04

redcrew
Member
Registered: 2007-03-23
Posts: 16

Re: zem_contact_reborn 4.0.3.19 (old version)

Ruud,

Interesting. I just tested the contact form in Internet Explorer 6 under Windows XP. It works fine redirecting to the designated page, without the additional characters in the address bar.

Offline

#99 2007-03-25 18:07:29

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)

redcrew, I’m not sure which browser displays the correct behaviour here. Looking at RFC2616 I’d say that Explorer shows the correct behaviour (we’re using a 303 redirect), although it doesn’t explicitly say that the Firefox behaviour is wrong:

The new URI is not a substitute reference for the originally requested resource.

When redirecting, the extra #anchor is used to make the browser scroll down to the part of the page that displays the form+errors+thanks. Since there’s no way for ZCR to know in advance if the form was filled out correctly, it’s not possible to leave the #anchor out when redirecting.

Last edited by ruud (2007-03-25 18:08:08)

Offline

#100 2007-03-25 18:25:16

redcrew
Member
Registered: 2007-03-23
Posts: 16

Re: zem_contact_reborn 4.0.3.19 (old version)

Ruud,

Thanks for the quick response. Perhaps I should forego my idea of redirecting to another page, and display the thanks on the contact page itself?

The reason I thought to use a different page was because that is how I’ve managed some forms in the past. Plus I couldn’t figure out how to do a conditional statment of “if form not filled out, display form/if form filled out, display thanks message” in Textpattern.

I’ve only started using Textpattern this past week, so I have a bit of a learning curve. I realize there are conditionals in Textpattern, but haven’t progressed to that level yet. In my PHP sites, I’ve used:

if (array_key_exists('send', $_POST))

where send is the value of the submit button to check what should be displayed on the page. If the form hasn’t been submitted, the form is displayed. If it was submitted, the “thanks” message was displayed.

Offline

#101 2007-03-25 19:23:21

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)

I think the ‘thanks_form’ attribute in the ‘zem_contact’ tag is what you’re looking for. It enables you to put the ‘thanks message’ in a regular TXP form and it will be displayed instead of the form upon successful submission.

Offline

#102 2007-03-25 19:48:31

redcrew
Member
Registered: 2007-03-23
Posts: 16

Re: zem_contact_reborn 4.0.3.19 (old version)

Okay, but a couple more questions:

1. I created the contact page as a static page, using a static page template, and created the content for the contact page as a “sticky” article, (following these instructions). The “sticky” article contains some text along with the code for the contact form.

I’ve created Textpattern forms for header, footer, and other content as type “misc”.

I can create a Textpattern form named “thanks”, containing the “thanks” message text, but I’m not sure what type of form it is. I’m assuming, though I’m not sure, that the type is “article”, is that correct? I read the explanation of article form:

An article form is used by the <txp:article /> tag to determine how to display each article on the page, for example.

but I’m a bit confused on the semantics. I’m creating a form for the “thanks” message, not an article.

2. In order to use the “thanks” form, should I move all the existing content that is currently in the contact “sticky” article to a Textpattern form named “contact”?
And then use some type of Textpattern conditional (which I haven’t discovered yet) to display either the “contact” info or the “thanks” message?

Last edited by redcrew (2007-03-25 19:52:39)

Offline

#103 2007-03-25 19:54:57

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)

I don’t know if the form type is checked anywhere in TXP, but for this purpose ‘misc’ fits best because it’s used as a code snippet, not as a template for an article.

The parts that you want to show only when the contact form is displayed should be inside the <txp:zem_contact> … </txp:zem_contact> container. Parts of the page you want to show regardless of whether the form is displayed or the thanks message, should be outside that zem_contact container. The content of the thanks_form is displayed instead of what’s inside the zem_contact container when the form is successfully submitted (that’s the condition, so no separate conditional is needed).

Offline

#104 2007-03-25 20:28:36

redcrew
Member
Registered: 2007-03-23
Posts: 16

Re: zem_contact_reborn 4.0.3.19 (old version)

Ruud,

Thanks again for such a quick reply.

I believe moving the text inside the zem_contact form will create usability issues, since

  1. there are several paragraphs of text before the form is presented.
  2. error messages in the form would precede the paragraphs of text and would not be in close proximity of the form itself

Did I misunderstand the location the error messages would display?

Offline

#105 2007-03-25 20:51:59

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)

You understood correctly. I think the ‘redirect’ solution fits best in your situation. You can probably combine that with the conditional approach you mentioned in post #100 by redirecting to the same page that hosts the form with ?thanks (or something like that) appended to the URL and using the query string to trigger the conditional.

Last edited by ruud (2007-03-25 20:53:41)

Offline

Board footer

Powered by FluxBB