Reply and delete links in comments missing

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

Reply and delete links in comments missing

Post by schimanke » Fri Jun 14, 2013 7:39 am

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

User avatar
yellowled
Regular
Posts: 7036
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: Reply and delete links in comments missing

Post by yellowled » Fri Jun 14, 2013 8:27 am

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
amazon Wishlist - Serendipity-Podcast (German only, sorry)

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

Re: Reply and delete links in comments missing

Post by schimanke » Fri Jun 14, 2013 10:59 pm

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...

User avatar
onli
Regular
Posts: 2231
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Reply and delete links in comments missing

Post by onli » Fri Jun 14, 2013 11:45 pm

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 5:38 pm
Location: Hameln, Germany
Contact:

Re: Reply and delete links in comments missing

Post by schimanke » Sat Jun 15, 2013 11:25 am

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

Post Reply