ran update

warning: Missing argument 3 for comment_og_link_alter() in /home/user/public_html/sites/all/modules/comment_og/comment_og.module on line 64.

Comments

tubby’s picture


/**
 * Implementation of hook_link_alter().
 * Removes comment link for non-members
 */
function comment_og_link_alter(&$links, $node, $comment) {
  $group = og_get_group_context();
  
  if ($group) {
    if ($node->comment && isset($node->og_groups)) {
      if (!og_is_group_member($group)) unset($links['comment_add']);
      if ($comment) {
        if (!og_is_group_member($group)) unset($links['comment_reply']);
      }
    }
  }
}

^what in that code is a boo boo?

if i remove that function, the errors go away.

LittleG’s picture

change this:
function comment_og_link_alter(&$links, $node, $comment) {
to this:
function comment_og_link_alter(&$links, $node, $comment = NULL) {

Complete code:

/**
* Implementation of hook_link_alter().
* Removes comment link for non-members
*/
function comment_og_link_alter(&$links, $node, $comment = NULL) {
  $group = og_get_group_context();
  
  if ($group) {
    if ($node->comment && isset($node->og_groups)) {
      if (!og_is_group_member($group)) unset($links['comment_add']);
      if ($comment) {
        if (!og_is_group_member($group)) unset($links['comment_reply']);
      }
    }
  }
}
tubby’s picture

Status: Active » Closed (fixed)

thanks :)

chromix’s picture

Status: Closed (fixed) » Patch (to be ported)

This error will fill your error logs with sadness. I just committed this fix and I'm putting out another release.

chromix’s picture

Status: Patch (to be ported) » Fixed

just setting to fixed for now...

Status: Fixed » Closed (fixed)

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