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.
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...
Comment | File | Size | Author |
---|---|---|---|
#1 | remove-reference-to-oa_core_get_group_from_node-2464033.patch | 671 bytes | LSU_JBob |
Comments
Comment #1
LSU_JBob CreditAttribution: LSU_JBob commentedComment #2
mpotter CreditAttribution: mpotter commentedThis 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.
Comment #3
hefox CreditAttribution: hefox commentedFrom 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.
Comment #4
Argus CreditAttribution: Argus commentedThis misses a "Steps to reproduce the bug"
Comment #5
Argus CreditAttribution: Argus commentedClosing due to inactivity. "Every so often" doesn't provide enough info. Please reopen if needed!