When the module is installed, the statistics for all available groups aren't gathered and stored.

I believe that would cause some problems when you have functions that:

function og_statistics_add_user($gid) {
  $stat = og_statistics_load($gid);
  $stat['members_count']++;
  return drupal_write_record('og_statistics', $stat, 'nid');
}

I would suggest to either rebuilt the stats on install or specify in the README that you must do this if you're adding to a site with OG already installed.

What do you think?

Comments

dawehner’s picture

The index has to be rebuilt to include already-existing nodes at the time of installation (see Configuration below).

This is already part of the readme.

mstef’s picture

Oh, I'm actually on rc5 so I guess that was added already. You can close this then. Thanks.

dawehner’s picture

Status: Active » Fixed

Great.

Status: Fixed » Closed (fixed)

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