"Configure Roles" tab only visible on "Add Members" page

itsnotme - September 8, 2009 - 09:46
Project:OG User Roles
Version:6.x-4.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

There is what I consider a small bug that's bad for the usability:

When a group admin opens his og/users list, the tab "Configure Roles" isn't instantly visible, only when the admin opens "Add Members" - then the tab appears.

My programmer came up with the following bugfix that works well in our tests. Add the bold line as line 162 in this context:

elseif ((!empty($item['map'][0]) && $item['map'][0] == 'og' && !empty($item['map'][2])) || $path == 'comment/reply/%') {
$node = og_user_roles_menu_get_object('node', 2);
$node = $node ? $node : node_load($item['map'][2]);
}

Hope that's all that's needed.

I did quite some testing yesterday and will probably implement the module in my live project soon, as it solves several prio 1 user demands for me. Thank you!

#1

itsnotme - September 10, 2009 - 08:17

A related problem showed up when og_user_roles didn't "know" that certain views were in the group context (in my case, I had extended the group tabs with views, e.g. "pages" of the group). So a content type permission that was connected to a user role in group was missing and the user could not create that content type at that point.

The solution my programmer found was to extend line 160 with a more complex check for the group context.

(This doesn't solve the problem yet that on a similar tab for Forums (which comes with og_forum), the user role context and all group tabs are lost again, possibly because the forums paths coming with og_forum start with forums/... No fix for this one yet, as it's a lower priority.)

#2

sun - November 11, 2009 - 03:33
Title:Small bug in the tab display» "Configure Roles" tab only visible on "Add Members" page
Version:6.x-4.x-dev» 6.x-4.0
Status:needs review» active

Please provide a proper patch.

#3

pwolanin - November 13, 2009 - 19:43

I'm observing this same bug

#4

pwolanin - November 13, 2009 - 19:43
Version:6.x-4.0» 6.x-4.x-dev

with the latest dev code

#5

pwolanin - November 13, 2009 - 19:57

It looks like the problem is that the og/users/% path is created by Views module and hence there is no associated node_load load function

#6

pwolanin - November 13, 2009 - 20:09
Status:active» needs review

Here's a patch which takes a slightly different approach, but essentially the same fix as suggested in the initial post.

AttachmentSize
missing-tab-571306-6.patch 687 bytes

#7

sun - November 13, 2009 - 21:18

Is that "menu system maintainer" approved? :)

#8

pwolanin - November 13, 2009 - 21:24

It's a bit of a hack either way - less overhead I think to check if it's numeric then running through all the rest of the logic.

#9

sun - November 14, 2009 - 00:22
Status:needs review» fixed

Thanks for reporting, reviewing, and testing! Committed to all branches.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

#10

System Message - November 28, 2009 - 00:30
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.