Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-06-17 12:43:26

keukenkikker
Member
From: Netherlands
Registered: 2006-08-08
Posts: 79
Website

Error message with preview comment form

I’m trying to activate the comments on one of my sites. Everything is working fine, but when I press the preview button, I receive an error message at the top of my screen saying:

tag_error <txp:comments_form isize=“25” msgcols=“45” msgrows=“15” /> -> Textpattern Warning: Duplicate entry ‘fdedc0b815a1a984dd25d20cf088ac8e’ for key 1
insert into hvh_txp_discuss_nonce set issue_time=now(), nonce=‘fdedc0b815a1a984dd25d20cf088ac8e’, secret=‘1a89eccc8f1e022d2cd55e05dc761551’ on line 81

When I press the submit button, the comment is posted and no error message appears. It looks like TP thinks it’s posted twice.

When I make an error when filling out the comment form (fi. I leave a field empty) I also receive the messages twice, that information is missing.

—-

A second problem with the preview is that the regular fields (name, email) are filled but white on white, the textfield however is readable. This is very confusing, because people will think the regular fields have to be filled out again.

Do you have any idea how to solve this? You can have a look at http://www.herstellenvanhersenletsel.nl/articles/6/sport.

Offline

#2 2008-06-17 13:23:48

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: Error message with preview comment form

Regarding the second problem: I can see the the entries’ top pixels in FF2. Deactivating padding in firebug makes the text display.
Edit: Wait until the other error is gone, the CSS will self-repair, I bet.

Last edited by uli (2008-06-17 14:15:44)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#3 2008-06-17 13:42:06

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Error message with preview comment form

You have your comments form appearing twice, once visible and once hidden by (X)HTML comments.

Offline

#4 2008-06-17 19:01:23

keukenkikker
Member
From: Netherlands
Registered: 2006-08-08
Posts: 79
Website

Re: Error message with preview comment form

Thanks Uli, for your reply. And thank you as well Mary, unfortunatly I have no idea what you mean. How can I make the hidden one go away?

Offline

#5 2008-06-17 19:52:04

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: Error message with preview comment form

If you look at the source code of the output you will see two sets of comments. You need to check your forms to see why this is happening. Look for <txp:comments /> appearing in more than one place.


BB6 Band My band
Gud One My blog

Offline

#6 2008-06-18 08:56:24

keukenkikker
Member
From: Netherlands
Registered: 2006-08-08
Posts: 79
Website

Re: Error message with preview comment form

Thank you for the tip, I’ve checked all the forms and the page which is used, but I can only find <txp:comments /> once. Maybe it has something to do with the IF statements? I’ll show the setup of the forms here:

Form Comments_display:
<h2 id=”<txp:text item=“comment” />”><txp:comments_invite textonly=“1” showalways=“1” showcount=“0” /></h2>

<txp:comments />

<txp:if_comments_preview>
<div id=“cpreview”>
<txp:comments_preview />
</div>
</txp:if_comments_preview>

<txp:if_comments_allowed>
<txp:comments_form isize=“25” msgcols=“45” msgrows=“15” />
<txp:else />
<p></p>
</txp:if_comments_allowed>

Form Comments:
<txp:comment_message />

<p class=“small”><txp:comment_name /> · <txp:comment_time /> </p>
<br>

Form Comment_form:
<div class=“post”>
<txp:if_comments_error> <h3 id=“cpreview” class=“error”>De velden die oranje zijn gemarkeerd moeten worden gecorrigeerd, voordat het formulier verzonden kan worden.</h3>

<txp:comments_error wraptag=“ul” break=“li” />
<txp:else />

<txp:if_comments_preview> <h3 id=“cpreview” class=“note”>Dit is een voorbeeld van je bericht, wijzig indien nodig, of <a href=”#publish”>verzend</a> je bericht.</h3> </txp:if_comments_preview>

</txp:if_comments_error>

<div>
<ul> <li><label class=“left”>Naam *</label> <txp:comment_name_input /></li>

<li><label class=“left”>Email *</label> <txp:comment_email_input /></li>

<li><label class=“left”>Website</label> <txp:comment_web_input /></li>

<li><label id=“comment_label” class=“left”>Bericht *</label> <txp:comment_message_input /> <p class=“comments_help”>Velden met een [ * ] zijn verplicht<br /> Je kunt <a href=“http://textile.thresholdstate.com/”>Textile</a> gebruiken voor de opmaak van je bericht.</p></li>

<li id=“publish”>
<txp:if_comments_preview>
<span class=“preview”><txp:comment_preview /></span>
<txp:comment_submit />
<txp:else />
<txp:comment_preview />
</txp:if_comments_preview>
</li>
</ul>
</div>
</div>

Offline

#7 2008-06-18 09:24:24

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Error message with preview comment form

Does the template you are using utilise a comments plugin?

Offline

#8 2008-06-18 09:28:57

keukenkikker
Member
From: Netherlands
Registered: 2006-08-08
Posts: 79
Website

Re: Error message with preview comment form

Well, I’m using asy_wondertag (it allows the use of tags as attributes in limited circumstances), but no other special plugins.

Offline

#9 2008-06-18 09:42:46

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Error message with preview comment form

Is this 4.06 TXP or an earlier version?

Offline

#10 2008-06-18 09:46:04

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Error message with preview comment form

The only thing I find strange is this error: “insert into hvh_txp_discuss_nonce” – the table name is “txp_discuss_nonce”.

Can you describe the comments settings you have in Admin?

Offline

#11 2008-06-18 10:00:15

keukenkikker
Member
From: Netherlands
Registered: 2006-08-08
Posts: 79
Website

Re: Error message with preview comment form

I’m using TP version 4.06.

The table hvh_txp_discuss_nonce is named that way, because I’m using two TP installations in one database. Therefor both installations have their own prefix.

The comments settings are as follows:
  • Require user’s name YES
  • Require user’s email address YES
  • Hide email address NO
  • Apply rel=“nofollow” to comments? YES
  • Strip user images? YES
  • Allow more Textile markup? NO
  • Spam blacklists (comma-separated) sbl.spamhaus.org
  • New comment means site updated? YES

Offline

#12 2008-06-18 10:07:51

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Error message with preview comment form

And what are the settings on the basic preferences page? Interestingly, in the advanced preferences page of my TXP 4.06 install I don’t have the option you describe: Allow more Textile markup? NO

Offline

Board footer

Powered by FluxBB