Posted by chuckdeal97 on November 21, 2008 at 4:29pm
| Project: | User Comment |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
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
#1
Here is the patch. It is designed to be run from the usercomment module directory.
#2
It's actually preferred to use:
<?phpdrupal_alter('link', $links, $node);
?>
instead of:
<?phpforeach (module_implements('link_alter') as $module) {
$function = $module .'_link_alter';
$function($node, $links);
}
?>
#3
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.
#4
Ok, how about this then... uses drupal_alter
#5
Here's the patch for the current DRUPAL-6--1 branch (with the correct offset).
#6
Any progress on this bugfix?
#7
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.
#8
Yeah, looks like the maintainer is not active at all. The only code update in 2008 was one update in September.
#9
The code should be fixed in the latest dev snapshot.
#10
Thanks very much gwen!
#11
Automatically closed -- issue fixed for 2 weeks with no activity.