Reply and delete links in comments missing

Creating and modifying plugins.
Post Reply
schimanke
Regular
Posts: 161
Joined: Mon Jan 07, 2008 4:38 pm
Location: Hameln, Germany
Contact:

Reply and delete links in comments missing

Post by schimanke »

Hi,

since I have updated to s9y 1.7 I am missing the reply and delete links which were displayed next to the comment author's name before. Anything I can do about it? Thanks in advance.

Regards,
Flo
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Reply and delete links in comments missing

Post by yellowled »

schimanke wrote:since I have updated to s9y 1.7 I am missing the reply and delete links which were displayed next to the comment author's name before. Anything I can do about it?
First of all, check your template's comments.tpl for $comment.link_delete and serendipity_reply_{$comment.id}. Also note that delete links will usually only be visible if you're viewing the blog while being logged in.

If your comments.tpl does contain those variables, they're not being emitted. Please post the part of the comments.tpl where they're being used. Also check if comments have been closed for the entries in question.

YL
schimanke
Regular
Posts: 161
Joined: Mon Jan 07, 2008 4:38 pm
Location: Hameln, Germany
Contact:

Re: Reply and delete links in comments missing

Post by schimanke »

Well, I found these lines in my comments.tpl:

Code: Select all

{if $entry.allow_comments}
                (<a href="#serendipity_CommentForm" onclick="document.getElementById('serendipity_replyTo').value='{$comment.id}';">{$CONST.REPLY}</a>)             {/if}{if $entry.is_entry_owner}
                (<a href="{$comment.link_delete}" onclick="return confirm('{$CONST.COMMENT_DELETE_CONFIRM|@sprintf:$comment.id:$comment.author}');">{$CONST.DELETE}</a>)
            {/if}</p>
Has anything changed in s9y 1.7? It was working under 1.6...
onli
Regular
Posts: 2825
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Reply and delete links in comments missing

Post by onli »

Yes, something has changed with the variable scope in smarty3. To fix the issue, add

Code: Select all

{assign var="entry" value=$entry scope="parent"}
below

Code: Select all

{foreach from=$dategroup.entries item="entry"}
in the entries.tpl of the design you use.
schimanke
Regular
Posts: 161
Joined: Mon Jan 07, 2008 4:38 pm
Location: Hameln, Germany
Contact:

Re: Reply and delete links in comments missing

Post by schimanke »

Thanks, onli! That really did the trick. Now the links are back.
Post Reply