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.
It is no longer possible to get all active groups with og_context(). You must specify a group. If you do not specify a group, og_context() always returns false.
https://www.drupal.org/node/1952980#comment-11105273
https://www.drupal.org/node/2713039#comment-11123007
FYI, this may have been introduced in 7.x-2.8, but I've only noticed it since I upgraded to straight 7.x-2.9 due to the security release.
Comments
Comment #2
pianomansam CreditAttribution: pianomansam commentedComment #3
pianomansam CreditAttribution: pianomansam commentedI believe I have identified the issue. I've made a comment on Github. It may require some changes to the og_context API.
https://github.com/Gizra/og/pull/31/commits/1a4c2c345fc5093533e9bef9e47f...
Comment #4
maikeru CreditAttribution: maikeru commentedIs there any workaround to get the current group?
I'd like to upgrade to 2.9, but we use og_context() quite a bit to get the current group...