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

pianomansam created an issue. See original summary.

pianomansam’s picture

Title: Unable to set group with og_context() » Unable to get active groups with og_context()
Issue summary: View changes
pianomansam’s picture

I 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...

maikeru’s picture

Is 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...