Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Problem with comments after upgrade
Ehhh this may be a stupid question but after upgrading (locally) my comments don’t work anymore and right above the input form I get the following text:
/article/articlenr/articlename#cpreview” id=”txpCommentInputForm”>
Did I miss something in the upgrade instruction or is my coding in the comment input form wrong?
Related plugins I use:
1. ajw_comment_alt 0.3
2. ajw_comment_num 0.2
3. ajw_if_comment_owner 0.3
4. zg_if_comment_cookies 0.1
5. glx_gravatar 0.2
6. ptv_if 0.3b
My comment forms:
comments comment
comments_display article
comment_form comment
Is this enough info?
Offline
Re: Problem with comments after upgrade
This is not supposed to happen.
or is my coding in the comment input form wrong?
Depends on what your coding looks like. Can you post the content of “comment_form”?
Also, there’s a lot of comment-related plugins there. Can you disable them all and see if that makes a difference?
Can you please also post the exact html-code of the part that appears broken. Thanks.
Offline
Re: Problem with comments after upgrade
Even disabling all comment related plugins doesn’t help.
Here my coding:
My comments form
<code><table width=“100%” border=“0” >
<tr valign=“top” >
<td>
<txp:glx_gravatar default=”/images/nogravatar.gif” class=“gravatar” />
</td>
<td>
<div class=“comment <txp:ptv_condition><txp:ptv_if plugin=“ajw_if_comment_owner” web=“www.mysite.nl”>mycomment</txp:ptv_if> <txp:ptv_else><txp:ajw_comment_alt /></txp:ptv_else> </txp:ptv_condition>”><txp:comment_permlink><txp:ajw_comment_num />. </txp:comment_permlink><txp:comment_name /> | <txp:comment_time /><txp:message /></div>
</td>
</tr>
</table></code>
My comments display
<code><txp:comments />
<txp:if_comments_allowed>
<txp:comments_form />
</txp:if_comments_allowed></code>
My comments form
<code><txp:comments_error />
<div id=“commentform”>
<h3>Add Your Comment</h3>
<p>You may use <a target=”_blank” href=“http://www.textpattern.com/help/?item=textile_comments” onclick=“window.open(this.href, ‘popupwindow’, ‘width=300,height=600,scrollbars,resizable’); return false;”>Textile</a> in your comment. <a href=“http://gravatar.com”>Gravatars</a> are enabled.</p>
<txp:if_cookie>
<strong>Welcome back, <?php echo pcs(‘name’); ?>!</strong>
<input type=“hidden” id=“name” name=“name” value=”<?php echo pcs(‘name’); ?>” size=“25” tabindex=“1” />
<input type=“hidden” id=“email” name=“email” value=”<?php echo pcs(‘email’); ?>” size=“25” tabindex=“2” />
<input type=“hidden” id=“web” name=“web” value=”<?php echo pcs(‘web’); ?>” size=“25” tabindex=“3” />
</txp:if_cookie>
<txp:if_no_cookie>
<span><label for=“name”>Your Name:</label><input type=“text” id=“name” name=“name” value=”<?php echo pcs(‘name’); ?>” size=“25” tabindex=“1” /></span>
<span><label for=“email”>Your Email:</label><input type=“text” id=“email” name=“email” value=”<?php echo pcs(‘email’); ?>” size=“25” tabindex=“2” /></span></TR>
<span><label for=“web”>Your http://</label><input type=“text” id=“web” name=“web” value=”<?php echo pcs(‘web’); ?>” size=“25” tabindex=“3” /></span>
</txp:if_no_cookie><span><label for=“message”>Your Comment:</label><textarea id=“message” name=“message” cols=“30” rows=“12” style=“width:275px;height:250px” tabindex=“4”><?php echo pcs(‘message’); ?></textarea></span>
<span class=“commentrem” ><txp:comment_remember /></span>
<txp:comment_preview />
<txp:comment_submit />
</div></code>
And part of the html code where it broke down:
<code>
<br />
</div>
<div class=“post-footer”></div></div>
/article/101/moloko#cpreview” id=“txpCommentInputForm”>
<h3>Add Your Comment</h3>
<p>You may use <a target=”_blank” href=“http://www.textpattern.com/help/?item=textile_comments” onclick=“window.open(this.href, ‘popupwindow’, ‘width=300,height=600,scrollbars,resizable’); return false;”>Textile</a> in your comment. <a href=“http://gravatar.com”>Gravatars</a> are enabled.</p>
<span><label for=“message”>Your Comment:</label><textarea id=“message” name=“message” cols=“30” rows=“12” style=“width:275px;height:250px” tabindex=“4”></textarea></span>
<span class=“commentrem” ><input type=“checkbox” name=“remember” value=“1” id=“remember” checked=“checked” /><label for=“remember”>Remember</label></span>
<input type=“submit” name=“preview” id=“preview” value=“preview” class=“button” />
</div><input type=“hidden” name=“parentid” value=“101” /><input type=“hidden” name=“backpage” value=”/article/101/moloko” /></form>
</code>
thanks for looking into it.
Last edited by maarten (2005-12-30 19:45:59)
Offline
Re: Problem with comments after upgrade
Go into high level diagnostics and check whether you have the correct version and hash of
/publish/comment.php: r1187 (d55dde574418d2eaf6a394d703056d9a)
Taken from the FAQ: How do I tell if I’ve upgraded correctly?
If that doesn’t help, please post your high-level diagnsotics (or link to them somewhere where we can read them).
1) Do you have the same problem on a clean install on the same machine?
2) Do you still have the problem on the clean install, when you copy over your comment_form?
3) You should also try out the default comment_form on your isntall and see if you still have those problems.
That looks to me like a very specific problem to do with something you have done.
Offline
Re: Problem with comments after upgrade
The version and hash are correct. Please take a look at my high level diagnostics at:
http://www.xpressit.nl/articledutch/106/high-level-diagnostics
I’ll try the clean install. thanks.
Last edited by maarten (2005-12-30 22:47:03)
Offline
#6 2005-12-30 22:35:17
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Problem with comments after upgrade
I can reproduce this on 4.0.3 using that comment input form. 4.0.2 worked as well as could be expected, given that I don’t have those plugins installed.
Alex
Offline
Re: Problem with comments after upgrade
Yes, I’m currently testing the cleaninstall and I also think the problem lies in the comment_form. When I copy a default comment form over the existing one the problem is solved.
Maybe it’s the usage of PHP in the comment form?
Offline
#8 2005-12-30 23:03:25
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Problem with comments after upgrade
I think it’s a bug in commentForm(), probably here:
$out = substr_replace( $out,
callback_event('comment.form'),
strpos($out, '<!-- plugin-place-holder -->'),
strlen('<!-- plugin-place-holder -->')
);
Alex
Offline
#9 2005-12-30 23:08:38
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Problem with comments after upgrade
I’m pretty sure that’s it; it’s triggered because you’re not using Textpattern’s comment input form tags (txp:comment_message_input, etc).
You could fix it temporarily by modifying that code in commentForm(), but you’ll probably run into other problems in future if you continue hard-coding the <input .. />
and <textarea>
tags.
Alex
Offline
Re: Problem with comments after upgrade
I can confirm the same problem on one site of mine and one of a friend.
We both use the same collection of comment plugins and highly modded comment_form.
In addtion, the ‘preview’ button doesn’t work.
Thanks for the tracking work on the problem Alex. Looks like a rewrite of our comment-forms is in order…
All the best for 2006
Offline
Re: Problem with comments after upgrade
thank you for looking into it Alex, Sencer and others. I think everybody who has styled his comments using this tutorial will experience the same problem.
I will change my commentform as I like to run the latest version of TXP.
Maarten
Offline
Re: Problem with comments after upgrade
My friend (much more capable with code than me) has rewritten the comment form to suit the 4.0.3, keeping all the functionality of the cookie ID, etc of that tutorial. My bad – that’s not the case. But the comment form does work now, albeit in a pretty standard way. Aplogies for any confusion…
If it’s of interest, I’ll post it here.
Cheers
Last edited by NeilA (2005-12-31 09:30:07)
Offline