I've installed organic groups version 5.x-6.0-rc3.

I've gone through the readme's installation and notes section and followed the instructions.

I can create a new group home page without a problem. But when I view the group home page (and I'm doing this as the site administrator) I get 4 warning messages:

warning: array_filter() [function.array-filter]: The first argument should be an array in /.../sites/all/modules/og/og.module on line 2515.

warning: array_fill() [function.array-fill]: Number of elements must be positive in /.../sites/all/modules/og/og.module on line 2515.

warning: implode() [function.implode]: Bad arguments. in /.../sites/all/modules/og/og.module on line 2516.

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND ogu.nid = 5 AND ogu.is_active = 1 AND u.status = 1 ORDER BY ogu.created DE' at line 1 query: SELECT DISTINCT(u.uid), u.* FROM og_uid ogu INNER JOIN users u ON ogu.uid = u.uid WHERE ogu.is_admin IN () AND ogu.nid = 5 AND ogu.is_active = 1 AND u.status = 1 ORDER BY ogu.created DESC LIMIT 0, 10 in /.../includes/database.mysql.inc on line 172.

The first three warnings pertain to the lines marked with a * beside them in the og.module file:

function og_block_subscribers_list($gid, $max = 10, $is_admin = array('members', 'admin'), $show_more = TRUE, $show_picture = NULL) {
  $placeholders = array_fill(0, count(array_filter($is_admin)), '%d'); //*
  $placeholders = implode(', ', $placeholders); //*
  $sql = "SELECT DISTINCT(u.uid), u.* FROM {og_uid} ogu INNER JOIN {users} u ON ogu.uid = u.uid WHERE ogu.is_admin IN ($placeholders) AND ogu.nid = %d AND ogu.is_active = 1 AND u.status = 1 ORDER BY ogu.created DESC";
  if (!empty($is_admin['members'])) {
    $args[] = 0;
  }
  if (!empty($is_admin['admins'])) {
    $args[] = 1;
  }
  $args[] = $gid;
  $result = db_query_range($sql, $args, 0, $max);
  return og_user_title_list($result, $gid, $show_more, $show_picture);
}

Has anyone gotten or is getting these messages? I haven't made any modifications to the og module all I've done is go through the setup.

Any help/suggestions is greatly appreciated.

Comments

number3’s picture

Resolved the issue. It seems like the enabling the blocks didn't set a default value and was causing the warning messages to appear.

I went into Administer - Site Building - Blocks

I had the following blocks enabled but had never configured them:
Group Network
New groups
Group members

Clicked configure for each block (didn't change any settings) and clicked save.

I went back to my group home page and the warning messages were gone.

Hope this saves someone a lot of time.

Saganesque’s picture

Configuring the "Group Members" module was enough to get it to disappear for me.