On line 381 of template.php, there is an if statement that throws a fatal php error.
if (!empty($node->{OG_AUDIENCE_FIELD}) && $wrapper->{OG_AUDIENCE_FIELD}->count() == 1)

I checked EntityDrupalWrapper and it does not have a count() method. This error occurred when I made the group OG both a group and group content (I am referencing the groups to a parent group).

Comments

marcissimus’s picture

Issue summary: View changes

This fatal error happended on my site, too, when using a group with subgroups in a menu. Site would already error on homepage not letting you see anything (since the error is raised in template.php). Site is on latest version of commons and all modules (at the time of writing).

Solution was adding the count method to the metadata wrapper in entity.wrapper.inc (at /profiles/commons/modules/contrib/entity/includes):

abstract class EntityMetadataWrapper {
...
  public function count() {
    return $this->dataAvailable() ? count($this->value()) : 0;
  }
}

Would be nice if some could include this in an official patch.

Thanks,
Marc