I'm not sure if this is a bug or just specific to my project but...

Every so often the function oa_core_get_group_from_node called from oa_core_members_widget_render returns it's parents NID incorrectly. I've included an initial patch that fixes the issue for my project but I'm not sure if this is the right thing to do...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

LSU_JBob’s picture

mpotter’s picture

Status: Active » Needs work

This patch won't work. You are assuming that the passed node context is always a space node. But you can put the Members widget on *any* page within the space (such as a Section page or content page). In that case you are loading the section/content node and not the space node.

If there is a problem with oa_core_get_group_from_node() you should drill down into that and find the actual source of the trouble.

hefox’s picture

From looking at the function, yhe only way for that to return the "wrong nid" when passed a space is that the space is a member of a another space via the og_group_ref field, which isn't the same field that parent relationship is used, so not sure what your setup is that cased that.

Argus’s picture

This misses a "Steps to reproduce the bug"

Argus’s picture

Status: Needs work » Fixed

Closing due to inactivity. "Every so often" doesn't provide enough info. Please reopen if needed!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.