Between og 5.7 and og 5.8, the $_SESSION['og_last'] variable was changed from a node to a nid. You caught most of these changes in og_user_roles, but you missed one. This is causing my site to lose the og_last context and thus setting the wrong group in og_get_group_context().

CommentFileSizeAuthor
#1 465122.patch2.03 KBdouggreen
og_last.patch508 bytesdouggreen

Comments

douggreen’s picture

StatusFileSize
new2.03 KB

Related to this problem, I've also discovered that og_user_roles_all_roles() gets called from both og_user_roles_init and og_user_roles_user op='load', both of which are called before og_init() has had an opportunity to set the og_get_group_context(), thus og_user_roles_all_roles() doesn't have the group context, and then changes $_SESSION['og_last']. While this is really a separate issue, because of it's affect on 'og_last', I've worked it as part of this issue.

See attached patch.

sun’s picture

Status: Needs review » Closed (won't fix)