Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Weird comment form behavior in IE
Hello,
I am running 4.0.6 and the comment system is working great — in all browsers except IE 6 (haven’t tested in 7 yet).
The problem is that when I click the “Preview” button below the comment form, it does not trigger the anchor link. Basically, nothing happens. Whatever linking behavior that is generated by…:
<txp:comment_preview />
<txp:comment_submit />
…is not working in IE.
Any ideas? Thanks. This is my first TXP project, and I love it, btw.
Offline
#2 2008-02-15 21:28:39
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Weird comment form behavior in IE
Offline
Re: Weird comment form behavior in IE
Thanks for your help, Mary. Again, my issue is that in IE 6, nothing happens when the user clicks on the comments preview button. The anchor link simply doesn’t activate. The site is live. Here is a sample permalink page.
Here is a tag trace:
<!-- Runtime: 0.2650 -->
<!-- Query time: 0.006283 -->
<!-- Queries: 26 -->
<!-- Memory: 2648Kb, <txp:comment_time /> -->
<!-- txp tag trace:
[SQL (0.001103): select name, data from txp_lang where lang='en-gb' AND ( event='public' OR event='common')]
[SQL (0.000248): select name, code, version from txp_plugin where status = 1]
[SQL (0.000079): select ID,Section from textpattern where ID = 28 and Status >= 4 limit 1]
[SQL (0.000103): select * from txp_section where name = 'blog' limit 1]
[SQL (0.000226): select *, unix_timestamp(Posted) as uPosted from textpattern where ID=28 and Status in (4,5)]
[article 28]
[SQL (0.000361): select ID, Title, url_title, unix_timestamp(Posted) as uposted
from textpattern where Posted > '2008-02-22 13:03:19' and Section = 'blog' and Status=4 and Posted < now() order by Posted asc limit 1]
[SQL (0.001898): select ID, Title, url_title, unix_timestamp(Posted) as uposted
from textpattern where Posted < '2008-02-22 13:03:19' and Section = 'blog' and Status=4 and Posted < now() order by Posted desc limit 1]
[SQL (0.000090): select host from txp_log where ip='24.41.62.163' limit 1]
[SQL (0.000078): select user_html from txp_page where name='blog']
[Page: blog]
<txp:output_form form="meta" />
[SQL (0.000079): select Form from txp_form where name='meta']
[Form: meta]
<txp:rah_metas keywords="tutorials, video, how-to, animation, whiteboard, marketing, customer, education, communication, visual thinking, technology, demo"/>
[SQL (0.000095): select ID, body, excerpt, Excerpt as excerpt_textile from textpattern where ID = '28']
<txp:css format="link" media="all" n="default" />
<txp:feed_link flavor="rss" format="link" label="RSS feed" limit="25" section="blog" />
<txp:output_form form="sidebar+menu" />
[SQL (0.000099): select Form from txp_form where name='sidebar+menu']
[Form: sidebar+menu]
<txp:section name="Default" >
</txp:section>
<txp:section name="about" >
</txp:section>
<txp:section name="show" >
</txp:section>
<txp:section name="blog" >
</txp:section>
<txp:output_form form="header" />
[SQL (0.000075): select Form from txp_form where name='header']
[Form: header]
<txp:output_form form="blog_sidebar" />
[SQL (0.000077): select Form from txp_form where name='blog_sidebar']
[Form: blog_sidebar]
<txp:article form="blog_post_listing"/>
[SQL (0.000077): select Form from txp_form where name='blog_post_listing']
[Form: blog_post_listing]
<txp:permlink>
<txp:title/>
</txp:permlink>
<txp:if_individual_article>
[<txp:if_individual_article>: true]
<txp:author/>
[SQL (0.000097): select RealName from txp_users where `name` = 'admin' limit 1]
<txp:posted/>
</txp:if_individual_article>
<txp:category1 title="1" link="1" />
[SQL (0.000080): select title from txp_category where name='Blog-Entry' and type='article']
<txp:category2 title="1" link="1" />
<txp:body/>
<txp:permlink id="24" title="First Video: Smartphones in a Nutshell">
[SQL (0.000096): select ID as thisid, Section as section, Title as title, url_title, unix_timestamp(Posted) as posted from textpattern where ID = 24]
</txp:permlink>
<txp:article form="comments_display"/>
[SQL (0.000076): select Form from txp_form where name='comments_display']
[Form: comments_display]
<txp:if_individual_article>
[<txp:if_individual_article>: true]
<txp:comments/>
<txp:comments_form form="custom_comment_form" show_preview="0"/>
[SQL (0.000096): select ip from txp_discuss_ipban where `ip` = '24.41.62.163' limit 1]
[SQL (0.000233): insert into txp_discuss_nonce set issue_time=now(), nonce='14a3110cdf72c9208360b3ba3d65bf84', secret='1861e3bb459e4c59ef0cbb8bc1835c1f']
[SQL (0.000093): select Form from txp_form where `name` = 'custom_comment_form' limit 1]
<txp:if_comments_preview>
[<txp:if_comments_preview>: true]
<txp:comments_preview/>
[SQL (0.000172): select Form from txp_form where name='comments']
[Form: comments]
<txp:comment_message/>
<txp:comment_web/>
<txp:comment_name/>
<txp:comment_time/>
</txp:if_comments_preview>
<txp:if_comments_error>
[<txp:if_comments_error>: true]
<txp:comments_error break="li" wraptag="ul" />
</txp:if_comments_error>
<txp:text item="comment_email" />
</txp:if_individual_article>
<txp:output_form form="footer" />
[SQL (0.000083): select Form from txp_form where name='footer']
[Form: footer]
<txp:zem_contact to="joshgunn@earthlink.net" label="contact">
[SQL (0.000163): insert into txp_discuss_nonce set issue_time = now(), nonce = 'e12ee033011bde8b81391a271bbfba6c']
<txp:zem_contact_email label="Email"/>
<txp:zem_contact_text label="Name" />
<txp:zem_contact_textarea label="Message" />
<txp:zem_contact_submit label="Send Email" />
</txp:zem_contact>
[ ~~~ secondpass ~~~ ]
-->
Thanks for your help.
Offline
Offline
#5 2008-02-23 02:19:37
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Weird comment form behavior in IE
Jukka is correct. Textpattern creates the opening/closing form tags for you, and you’ve added your own to the form. Remove them and you should be fine. :)
Offline
Re: Weird comment form behavior in IE
Much appreciated. I will muck around with it.
Offline
Re: Weird comment form behavior in IE
Hmm. I took out my custom form, pasted my code from my custom-made form into the default comment_form, and took out the call to the custom form from <txp:comments_form />. No luck. In IE 6 (and ONLY in IE 6) clicking the “Preview” button will not trigger the comments preview section. Here is my comment form code:
<h3>Leave your comment:</h3>
<p>On-topic, constructive, and well-meaning comments are welcome.</p>
<txp:if_comments_preview>
<div id="cpreview">
<p class="preview">This is only a preview. Please press the "Submit" button below before exiting.</p>
<txp:comments_preview />
</div>
</txp:if_comments_preview>
<txp:if_comments_error>
<txp:comments_error break="li" wraptag="ul" />
</txp:if_comments_error>
<form>
<fieldset>
<label for="name">Name (required)</label>
<txp:comment_name_input />
<br />
<label for="email"><txp:text item="comment_email" /></label>
<txp:comment_email_input />
<br />
<label for="web">http://</label>
<txp:comment_web_input />
<br />
</fieldset>
<fieldset>
<label for="message">Your message (required)</label>
<span class="textile-only">(No HTML, <a href="http://textism.com/tools/textile/">Textile</a> only please.)</span>
<txp:comment_message_input />
</fieldset>
</form>
<div class="andfinally">
<txp:comment_remember />
<txp:comment_preview />
<txp:comment_submit />
</div>
Thanks.
Offline
Re: Weird comment form behavior in IE
You still have two form
elements. The TXP form, comment_form, is automatically wrapped in a form
.
Offline
Re: Weird comment form behavior in IE
Got it! Thanks so much! It works now. IE just wasn’t being lazy enough for my bad code. Cheers.
Offline
Pages: 1