Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
marcissimus CreditAttribution: marcissimus commentedThis 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):
Would be nice if some could include this in an official patch.
Thanks,
Marc