Closed (fixed)
Project:
OG User Roles
Version:
6.x-4.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Nov 2009 at 20:31 UTC
Updated:
11 Mar 2010 at 06:02 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
pwolanin commentedI'm seeing this too, though it's frustrating that the automatic roles don't appear in the form at all at ?q=og/users/$gid/roles
Comment #2
pwolanin commentedHere's a patch that fixes the bug and the usability issue of the automatic roles not being visible. Just the changes to function og_user_roles_page_form_submit() are enough to fix the bug of the roles being removed.
re-used a t() string, so no alteration to .po files needed.
Comment #3
pwolanin commentedHere's a screen shot showing the altered table.
Comment #4
sunThanks!
Unfortunately, it seems like the whole default roles functionality is not tested yet. :-/ Would it be too much to ask you to also enhance the tests?
This variable + form structure key should be named $default_roles.
We can skip the #type here.
Please remove the <em> and shorten to "Default roles".
This review is powered by Dreditor.
Comment #5
pwolanin commentedI tested the defaults by hand - and mfer is using them. I can re-roll the patch, but don't really have the time to code up tests right now.
hmm, I guess there are no translations yet - I was trying to re-use the t() string t('Default role assignments')
I used the EM tags to highlight the fact that this heading was not a role name - some other approach?
Comment #6
pwolanin commentedHere's a re-roll. Moves the check_plain() of role names to an array_map() call so as to keep doing it for the same strings for many users.
Comment #7
mfer commentedI've tested the patch and it works.
Comment #8
sunok, I took the time to parse the original post into a test that does exactly the same.
And, indeed, the last assertion is failing.
I committed attached patch to HEAD. Let's see whether this patch makes it work. :)
Comment #9
sunThanks for reporting, reviewing, and testing! Committed attached patch to HEAD.
A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.
Comment #11
sunLooking at the resulting screen by coincidence in http://localize.drupal.org/node/616...
It looks like we should skip the "Default roles" column entirely when no default roles have been assigned?
Comment #12
sunwell, let it be a different issue.