Download & Extend

Comment links from third-party modules are wiped out

Project:Nitobe
Version:6.x-2.0
Component:Code
Category:bug report
Priority:critical
Assigned:Shannon Lucas
Status:closed (fixed)

Issue Summary

The handling of comment links is causing contrib modules to fail to be able to add links. Specifically Mollom cannot add the abuse-reporting links. Commenting out the following line prevents this from occurring --

$variables['links'] = theme('links', comment_links($comment, 0), NULL, 'comment-meta');

And commenting out this line breaks some of the theme's functionality like the ability to remove the reply link because it changes the results of nitobe_links()

Comments

#1

Priority:normal» critical
Assigned to:Anonymous» Shannon Lucas

I remember I put that in there for a reason, but I don't remember what that was anymore.

In any event, the behavior definitely needs to get fixed. I'm raising the priority on it since this interferes with normal usage.

#2

It seems there's no place to intercept the link array before template_preprocess_comment themes the links. The solution is to rebuild the link array by calling module_invoke_all. This fix will be incorporated in the next release.

<?php
  $linkage       
= module_invoke_all('link', 'comment', $comment);
 
$suppress_reply = (boolean)theme_get_setting('nitobe_suppress_comment_reply', FALSE);

  if (
$suppress_reply) {
    unset(
$linkage['comment_reply']);
  }

 
$links              = theme('links', $linkage);
 
$variables['links'] = $links;
?>

#3

Version:6.x-1.8-beta1» 6.x-2.0
Status:active» fixed

This fix is incorporated in the 6.x-2.0 release.

#4

Status:fixed» closed (fixed)
nobody click here