Page 1 of 1

Comment preview: first comment

Posted: Tue Oct 20, 2009 12:52 pm
by yellowled
I just noticed that the comment preview in my new template at http://matthias.yellowled.de does not display the preview comment if it is the first comment for an entry. Quite frankly, I don't even have an idea where exactly to start looking for the error. comments.tpl? entries.tpl? commentform.tpl? Which one is responsible for the preview and where?

I am assuming it is comments.tpl since that's the one with the most significant changes compared to default. But what part of it is responsible for the preview?

YL

Re: Comment preview: first comment

Posted: Tue Oct 20, 2009 3:07 pm
by garvinhicking
Hi!

I believe entries.tpl is the problem, if you only show comments when $entry.comments > 0 you will never get a preview area, because $entry.comments will be 0.

Regards,
Garvin

Re: Comment preview: first comment

Posted: Tue Oct 20, 2009 3:49 pm
by yellowled
garvinhicking wrote:I believe entries.tpl is the problem, if you only show comments when $entry.comments > 0 you will never get a preview area, because $entry.comments will be 0.
Yes, that was to be the problem. Yet it isn't in entries.tpl but in comments.tpl. I had some if statement in there which prevented the preview area.

All entries.tpl does to emit comments is

Code: Select all

{serendipity_printComments entry=$entry.id mode=$entry.viewmode}
which I believe then "calls" comments.tpl.

Thanks :)

YL