Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#16 2008-06-18 10:46:40
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Error message with preview comment form
You have Txp set to automatically append comments to articles. Are you also appending them manually in your article form or page?
Offline
Re: Error message with preview comment form
Mary, I don’t think I append the comments manually to my articles (you can see my forms in post #6). I’ve turned of the automatically append setting and I could not get to the comments anymore. When I turned them back on, I could see them again.
Jstubbs, The other install is working fine. However, this one is on TP version 4.05. I’ve copied the forms from the working install, to the 4.06, but the problem remains. Tonight I’ll see if I can update the 4.05 to 4.06 and see if this has some effect.
Offline
Re: Error message with preview comment form
Sharon, Mary is referring to your article form. What she is wondering is if you have, by mistake, another txp:comments tag either in your article form or in your page template.
As you are seeing that the comments work correctly in your normal 4.05 install, it would seem that the problem is either a bug in 4.06, or that the hvh_ prefix on your 4.06 install is causing problems.
Offline
Re: Error message with preview comment form
jstubbs wrote:
Sharon, Mary is referring to your article form. What she is wondering is if you have, by mistake, another txp:comments tag either in your article form or in your page template.
Yeah, Jonathan, basically like that. But there needs to be the whole set of comment tags, not just <txp:comments /> as it would just show comments, not the actual comment form.
Therefor, I suggest you, Sharon, to check if you have <txp:output_form form="comments_display" /> in your forms or pages that is the simplest way to manually append comments. If there it that line of code, then delete it.
Last edited by Gocom (2008-06-18 15:11:39)
Offline
#20 2008-06-18 15:20:01
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,316
Re: Error message with preview comment form
Another good reason for installing smd_where_used. Will find it for you in any of your forms, pages, articles, …
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: Error message with preview comment form
There used to be a problem if you had more than one instance of txp:article on a page, when the comments and comment form would appear each time. So the solution was as follows. You can check your forms against these, Sharon, and see if they are essentially the same. Otherwise it might be the cause of your problem.
Preferences –
Accept comments? Yes
On by default? Yes
Automatically append comments to articles? No
default form –
(various stuff) then
<txp:body />
<txp:if_comments_allowed>
<txp:output_form form=“comments_display” />
<txp:else />
<h4>Comments…</h4>
<txp:comments />
</txp:if_comments_allowed>
comments_display form -
<txp:if_comments>
<h4>Comments…</h4>
<txp:comments />
</txp:if_comments>
<txp:if_comments_preview>
<div id=“cpreview”>
<p>This is only a preview. Re-read your comment and submit it below.</p>
<txp:comments_preview />
</div>
</txp:if_comments_preview>
<txp:else />
<txp:comments_form />
comments form –
the default is ok or some variation on this:
<txp:comment_message />
<txp:comment_name />
<txp:comment_time />
<txp:comment_permlink>#</txp:comment_permlink>
comment_form form –
<txp:if_comments_preview>
<p>This is only a preview. Re-read your comment and submit it below.</p>
</txp:if_comments_preview>
<h4><label for=“message”>Comments…</label></h4>
<txp:comment_message_input /><br />
<span id=“comments-help”><txp:comments_help /></span>
<br />
<txp:comment_name_input /><label for=“name”> Name</label>
<br />
<txp:comment_email_input /><label for=“email”> Email</label>
<br />
<txp:comment_web_input /><label for=“web”> Website</label>
<br />
<txp:comment_remember />
<txp:comment_preview />
<txp:if_comments_preview>
<div><txp:comment_submit /></div>
</txp:if_comments_preview>
Dozy P My attempt at music
Offline
Re: Error message with preview comment form
- <txp:comments /> is only used in the form ‘comments_display’
- <txp:output_form form=“comments_display” /> is only used in the form ‘default’
Nice plugin :-) by the way. No problems there.
In the mean time I’ve updated my other TP install to 4.06 and this one has no errors with comments.
Peter, I’ll check the forms I use against the ones you showed me.
Last edited by keukenkikker (2008-06-19 09:51:31)
Offline
Re: Error message with preview comment form
Mmm, I’ve copied your forms into my setup and I’ve changed the settings you mentioned. Now I get te following message which is strange because the form ‘comments_display is a standard form and it is present ….
tag_error <txp:output_form form=“comments_display” /> -> Textpattern Notice: De module kan niet worden gevonden: “comments_display” on line 1437
Offline
#24 2008-06-19 10:24:59
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,316
Re: Error message with preview comment form
De module kan niet worden gevonden = The module can not be found ;)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: Error message with preview comment form
If I remember correctly, TXP will add your comments form automatically if you set this option to yes in the article itself.
Having txp:output_form form=“comments_display” in your default form might result in the comments appearing twice. Try taking it out and see what happens.
Offline
Re: Error message with preview comment form
Hi Jonathan,
The problem is solved. I’ve been copying forms from and too the installation. I’ve copied the originals back in and it’s working! I think I’ve changed something in the originals but unfortunatly I don’t know what exactly. The only thing which is left is some styling issue, which I need to fix.
Thank you all, for helping me out!
Offline
Re: Error message with preview comment form
Glad you got it working! I am curious if the txp:output_form form=“comments_display” in the form ‘default’ was causing the problem?
Offline
Re: Error message with preview comment form
txp:output_form form=“comments_display” in the form ‘default’ is what I use all the time, as are the other forms I posted. They don’t cause me any problems or I wouldn’t have posted them. There are other ways of doing it I am sure, it’s just getting the interaction between them all that’s the problem. Anyway, glad you fixed it, Sharon!
Dozy P My attempt at music
Offline
Re: Error message with preview comment form
Peter and Jonathan, as I said earlier yes it is cause: it outputs the set of comments, and when the site already uses auto-appending, then it causes double comments and forms. Not a big deal :)
Last edited by Gocom (2008-06-20 02:36:34)
Offline