Team Notifications module depends on the view "notifications_team_users" to populate the list of users that are available for notification when commenting on a node (in my case, a support ticket that belongs to a specific organic group).

When the contextual filter "Field: Groups audience:gid" is chosen and then the "provide default value" is set to "The OG groups of the logged in user" then things seem to work as they should. However, this is not ideal because we only want users who are part of the group for which the node belongs to show up in the list. We do not want all users for any group the user happens to be a part of to show up in the list.

This problem seems to be addressed by selecting "Current OG group from context" when configuring the contextual filter default value. However, the system starts throwing an error when commenting from the node page or when using the comment reply function (taken to a seperate page to comment):

Notice: Undefined property: views_plugin_style_default::$rendered_fields in notifications_team_get_users() (line 82 of /home/knectar/support/sites/all/modules/notifications_team/notifications_team.module).
Warning: Invalid argument supplied for foreach() in notifications_team_get_users() (line 82 of /home/knectar/support/sites/all/modules/notifications_team/notifications_team.module).

I suspect this is happening because part or all of the comment submission process is not taking into account the group context. Any thoughts or ideas on this would be greatly appreciated.

Comments

Kirschbaum’s picture

Issue summary: View changes

minor text adjustment

sanguis’s picture

Status: Active » Fixed

This turned out not to be a team ui code bug so much as og_context lacking support for comments paths.
I created a module for this at http://drupal.org/project/og_context_comment.
to fix.
Enable the above module.
Go to og_context config page and enable the "Add Comment" detection method.

Watch it work.

Kirschbaum’s picture

Awesome. Thanks Josh!

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

minor text change.