Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
What's wrong with my comments?
I’ve just updated Textpattern to the latest revision, and now I’m trying to ditch the old ways of commenting for the new. I did this because I realized the comment preview had gone missing at some point during my incremental redesign (i.e., fiddling with the code now and then).
Here’s the form I use at the end of my “Single” article form:
<code> <txp:if_comments> <h3>Comments</h3> <txp:comments /> </txp:if_comments>
<txp:if_comments_allowed> <h3>Add your comment</h3> <txp:if_comments_preview> <div id=“cpreview” style=“background-color:#ff7”> <em>The following is a preview of your comment. Please re-read it for clarity and hit submit once you approve of it.</em> <txp:comments_preview form=“comments” /> <txp:comments_form form=“comment_form_dl” preview=“1” /> </div> <txp:else> <txp:comments_form form=“comment_form_dl” /> </txp:if_comments_preview> <txp:else> <h3>Comments closed</h3> <p><txp:text item=“comments_closed” /></p> </txp:if_comments_allowed> </code>If comments are enabled, the “Add your comment” heading shows, but nothing more.
If comments are disabled, nothing shows.
Last edited by travholt (2006-01-12 22:48:14)
Offline
Re: What's wrong with my comments?
Also, how the heck does one display code correctly? I’ve tried every conceivable combination of code and pre tags there is, with and without indentation of the actual code, but nothing cuts it.
Offline
Re: What's wrong with my comments?
A good place to start debugging such problems, is to enable debug-mode and look at the tag-trace at the bottom of the page (in an html-comment). It will show you which tags are called, and how conditionals are evaluated. If possible, you can enable debug mode and link to such a page for us to take a look.
Offline
#4 2006-01-12 23:29:23
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Offline
#5 2006-01-12 23:34:05
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: What's wrong with my comments?
<txp:else>
This looks fishy. Should be <txp:else />
.
Alex
Offline
Re: What's wrong with my comments?
> Sencer wrote:
> A good place to start debugging such problems, is to enable debug-mode and look at the tag-trace at the bottom of the page (in an html-comment). It will show you which tags are called, and how conditionals are evaluated. If possible, you can enable debug mode and link to such a page for us to take a look.
Huh. Who knew? Well, actually, I knew, but didn’t think of it as a possibility. Anyway, enabling debug mode displayed a few error messages about <code><txp:else></code> being an unknown tag, which of course it is, since it’s supposed to be <code><txp:else /></code>.
Problem solved! Thanks!
Offline
Pages: 1