In usercomment_comment_render() the construction of the link_alter call was incorrect it was calling the function with the parms in the wrong order.

It was this

      $function = $module .'_link_alter';
      $function($node, $links);

But, it should be

      $function = $module .'_link_alter';
      $function($links, $node);

I'll work on creating a proper patch for this.

Comments

chuckdeal97’s picture

Assigned: Unassigned » chuckdeal97
Status: Active » Needs review
StatusFileSize
new443 bytes

Here is the patch. It is designed to be run from the usercomment module directory.

dave reid’s picture

It's actually preferred to use:

drupal_alter('link', $links, $node);

instead of:

    foreach (module_implements('link_alter') as $module) {
      $function = $module .'_link_alter';
      $function($node, $links);
    } 

chuckdeal97’s picture

Alright, thanks. When I get a minute, I'll give that a shot. I'm not the original author and I am just trying to get the module working up to snuff.

chuckdeal97’s picture

StatusFileSize
new554 bytes

Ok, how about this then... uses drupal_alter

dave reid’s picture

Priority: Normal » Critical
StatusFileSize
new502 bytes

Here's the patch for the current DRUPAL-6--1 branch (with the correct offset).

dave reid’s picture

Any progress on this bugfix?

chuckdeal97’s picture

I have applied this fix to my code and it fixes the problem. I was hoping that someone other than me has applied and verified the solution.

I'm not the maintainer, and I don't know what the procedure for creating a new project release is, but there are a number of D6 patches that should be applied to this project, in addition to this one.

dave reid’s picture

Yeah, looks like the maintainer is not active at all. The only code update in 2008 was one update in September.

gwen’s picture

Status: Needs review » Fixed

The code should be fixed in the latest dev snapshot.

dave reid’s picture

Assigned: chuckdeal97 » Unassigned

Thanks very much gwen!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.