Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-12-31 00:18:09

kiplet
Member
Registered: 2006-01-28
Posts: 35
Mastodon

Question regarding how comments are built.

I have three different weblogs in Textpattern.

In two of them, comments work perfectly and display as expected.

In the third, comments will not display at all. Comments can be made, and are emailed to me; I can see them in the comments tab under content. But they will not appear under the article.

All three weblogs are set to automatically append comments, and to display them as a numbered list. The comments forms are identical in all three weblogs: comments, comments_display, comment_form.

But again: two display the numbered list of comments, then the comment input form, after an article that has comments.

The third merely displays the comment input form.

Obviously there are differences between the three weblogs in terms of presentation and other forms. But because so much of the comments display and generation happens automatically, behind the scenes, I can’t for the life of me figure out where to go to troubleshoot this, since as far as I can tell everything having to do with comments is identical in all three cases. I’m sure the answer is dead simple and staring me in the face. Can anyone provide a swift kick in my pants as to what I’m missing?

Thanks.

Offline

#2 2008-12-31 15:20:48

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Question regarding how comments are built.

On your problem site, in the “Preferences” tab you don’t by any chance have the “Moderate comments?” option set to “Yes”?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#3 2008-12-31 15:28:30

kiplet
Member
Registered: 2006-01-28
Posts: 35
Mastodon

Re: Question regarding how comments are built.

Nope. That site, in fact, doesn’t have moderated comments; the other two, getting far more traffic, do.

No, on the comments tab in Textpattern, all comments show as visible.

The thing that gets to me is that the form that displays the comments form also displays the list of comments for an entry. It’s all in one place! But the form displays fine on the problem site, and the list of comments doesn’t appear at all: where the other sites have the list wrapped in ol tags (I’ve got all three set to present as numbered lists), the ol tags don’t appear at all in the pages generated for the problem site.

Offline

#4 2008-12-31 15:34:35

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Question regarding how comments are built.

Do you have a link?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#5 2008-12-31 16:06:19

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Question regarding how comments are built.

kiplet wrote:

The thing that gets to me is that the form that displays the comments form also displays the list of comments for an entry. It’s all in one place!

What exactly do you mean? That the tags for displaying the comments are in the ‘comment_form’ form? If so, I don’t think they should be there. But I may very well misunderstand you.

Also, are all three sites using the same Txp version? 4.0.7 is very strict about your tag use, it doesn’t accept certain typos and other tag errors (like missing or superfluous closing slashes) that caused no problems in earlier versions.

Offline

#6 2008-12-31 16:25:51

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Question regarding how comments are built.

I think what kiplet means is that the comments_display form controls both the comments and the comments_form, so if the comments_form is displaying why aren’t the comments? I think. ;)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#7 2008-12-31 17:46:34

kiplet
Member
Registered: 2006-01-28
Posts: 35
Mastodon

Re: Question regarding how comments are built.

thebombsite got what I meant: comments_display is what triggers both comments and comment_form. All three forms are identical in all three sites. Two work; one doesn’t. The one that doesn’t work displays comment_form just fine, but doesn’t display comments at all, despite the presence of live, visible comments.

I did have 4.0.5 across all three sites. The problem existed then. I’ve now (as of yesterday) upgraded to 4.0.7 on the problem site; the problem still exists.

I did try switching to popup_comments, in case there was a syntax error somewhere I was missing, but popup_comments doesn’t display comments either. That’s what’s led me to believe there’s something elsewhere, on another form or page, that I’m missing, and I’m looking for suggestions as to what it might be, since all I can see is comments_display is called, and it calls comments and comment_form, and comment_form works fine and comments fails utterly for no reason I can see, despite working fine for me on two other txp sites.

Let me see if I can properly post the code:

comments_display

<txp:comments />
<txp:if_comments_allowed>
<txp:comments_form />
<txp:else />
<p><txp:text item="comments_closed" /></p>
</txp:if_comments_allowed>
comments

<txp:message /><br />
<small>— <txp:comment_name />    <txp:comment_time />    <txp:comment_permlink>#</txp:comment_permlink></small>

Offline

#8 2008-12-31 17:48:58

kiplet
Member
Registered: 2006-01-28
Posts: 35
Mastodon

Re: Question regarding how comments are built.

Grr. Forget that Preview eats Unicode.

<txp:message /><br />
<small>&#8212; <txp:comment_name /> &#160;&#160; <txp:comment_time /> &#160;&#160; <txp:comment_permlink>#</txp:comment_permlink></small>

Offline

#9 2008-12-31 18:54:31

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Question regarding how comments are built.

Did you check the tag trace of the problem page?

Offline

#10 2008-12-31 19:18:13

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Question regarding how comments are built.

It’s the tag in the comment and preview form. <txp:message /> should now be <txp:comment_message />. That suggests this site might be older than the other two?

Last edited by thebombsite (2008-12-31 19:18:44)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#11 2008-12-31 19:18:40

kiplet
Member
Registered: 2006-01-28
Posts: 35
Mastodon

Re: Question regarding how comments are built.

Comments are set to be automatically appended to the end of every article. So it’s every page, pretty much, and there’s no specific tag that calls comments_display.

Unless I’m missing something.

Offline

#12 2008-12-31 19:20:34

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Question regarding how comments are built.

Did you get my previous post?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#13 2008-12-31 19:22:46

kiplet
Member
Registered: 2006-01-28
Posts: 35
Mastodon

Re: Question regarding how comments are built.

Yup; I was typing as you posted.

thebombsite wrote:

It’s the tag in the comment and preview form. <txp:message /> should now be <txp:comment_message />. That suggests this site might be older than the other two?

Nah, both the other two also have <txp:message />. I just updated the problem site (currently running 4.0.7; the other two run 4.0.5) to change comments to

<txp:comment_message /><br />
<small>&#8212; <txp:comment_name /> &#160;&#160; <txp:comment_time /> &#160;&#160; <txp:comment_permlink>#</txp:comment_permlink></small>

This did not fix the issue.

Last edited by kiplet (2008-12-31 19:23:49)

Offline

#14 2008-12-31 19:32:41

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Question regarding how comments are built.

When Els asked about a tag trace what she was talking about was this; if you go into the problem site’s admin, go to the “Preferences” tab and set the “Production Status” to “Debugging”, then navigate to your site’s page where comments should appear but don’t, then view the source code, near the bottom you will see the “txp tag trace” (for me it usually displays in green). This shows you TXP’s logic as it parses through your page template. If you can copy/paste that here we might be able to see where things are going wrong.

Don’t forget to change the “Production Status” option back to what it was.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#15 2008-12-31 19:42:01

kiplet
Member
Registered: 2006-01-28
Posts: 35
Mastodon

Re: Question regarding how comments are built.

Whoa!

	<txp:comments />
		tag_error <txp:comments /> -> Textpattern Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
select *, unix_timestamp(posted) as time from txp_discuss where parentid=321 and visible=1 order by  
textpattern/lib/txplib_db.php:220 startrows()  on line 82
		[SQL (0.0001060962677): select *, unix_timestamp(posted) as time from txp_discuss where parentid=321 and visible=1 order by  ]

thebombsite, thanks for the patient explanation.

Now the question becomes: since this is on the same ISP and server as the other two, how did the SQL syntax get borked?

Offline

Board footer

Powered by FluxBB