I've been trying to get this module working for quite a while now. I've tried everything I could think of. I even registered with a host so as to test it on internet.. But still can't get it working.

I first tested it on my laptop localhost -- that didn't work. The only reason that I could think of is that it was on http://localhost/drupal52 (which could contradict one of the requirements).

Then I registered with a host and made a subdomain: sandbox.domainname.com --- but it still does not work.

There are 3 type of users that I want to be assignable: Group Admin, Group Moderator and Group Contributor. And I've set it so that the one who creates the group will have the role "Group Founder".

Only "Group Founder" and "Group Admin" have the right to assign roles.

Then I created some dummy users and and some dummy groups. When a dummy user creates a group, and then clicks on "# subscribers" , he still can't see the "Configure member roles" tab. I tried many things, but I still can't get this module working.

Now, here's something interesting: when you go to Admin>> Users, in the table list , in the row where it says "Roles" all entries are empty. And the only way that I can get dummy users to see "Configure member roles" tab is if I (global admin) MANUALLY set those users as "Group Admin" or "Group Founder". Otherwise, it doesn't do it automatically. But what if there are hundreds of groups and thousands of users???

I was hoping that 2.0 version of this module is going to sort this problem but I'm still confused. Is this is a bug or am I doing something totally wrong?

(Additional info: fresh Drupal 5.2 installation on sandbox.domainname.com ; OG; Og calendar; OG Forum; OG user roles; Mime Mail)

Comments

somebodysysop’s picture

Assigned: Unassigned » somebodysysop

Don't know why group members to whom you've assigned roles that have the "configure member roles" permission can not see the "Configure member roles" tab. Since this is a dummy site, may I log in to see what I can see? If so, use contact form to email me pertinent info.

drupalina’s picture

No, the whole problem is that if I assign roles mannually, then they will see "Configure member roles" tab. But OG_user_roles module is supposed to do it Automatically!

If someone has just created a new group, then his role must shift from "Authenticated User" to "Group Founder" -- right?

And when as admin you do to Admin>>Users , in the "Roles" column, everyone still has no entries (not even "authenticated user"!!!), whereas some of them should be "Group Founder".

somebodysysop’s picture

If someone has just created a new group, then his role must shift from "Authenticated User" to "Group Founder" -- right?

OG User Roles never messes with a global (sitewide) role. But, if in OG User Roles settings, you have set a configuration for "Default Founder Role for users who create groups", then OG User Roles will automatically assign the user who creates a group to that role WITHIN the group he has just created.

And when as admin you do to Admin>>Users , in the "Roles" column, everyone still has no entries (not even "authenticated user"!!!), whereas some of them should be "Group Founder".

OG User Roles (that is, roles assigned to users using the "Configure member roles tab") NEVER show up in the Admin>>Users "Roles" column. Why? Because they are group specific roles, not global roles.

Now, I just tested the latest version of OG User Roles, and if "Default Founder Role for users who create groups" is configured correctly, then the user who creates a group is assigned to the "Founder" role automatically within that group.

Is this not happening on your site?

drupalina’s picture

Buddylist module, it seems, clashes with OG User Roles!!! This is very weird! Today I started disabling modules one by one, so as to see which module clashes with OG User Roles module. After disabling some modules, the problem with "Configure member roles" not being visible to OG-founder persisted. Then I disables Buddylist module -- and would you believe it... "Configure member roles" tab appeared to OG-founders. Did anybody else notice that Buddylist clashes with OG User Roles? Is there a solution?

this is awkward. I don't want to choose between these two modules, because they are both important to me.

It looks like Buddylist is the source of all troubles. Are there any solutions, or work-arounds?

Going back to your reply, I did and checked everything about OG_User_Roles as it is outlined in read-me file and handbook. Still, in member listings the founder of the group does not show as "Group Founder" (the name that I gave), but as "Admin" (seemingly default name that comes with OG module).

When it comes to privileges in all other aspects of Roles settings, I have configured these 4 extra roles in the same way as Authenticated user. Is this a correct way of doing it, or should I just have left all those checkboxes pertaining to Blogs and comments and other modules just blank??? This is the only other reason for OG_User_Roles mulfunctioning that I could think of.

I also modified my theme a little bit (originally Zen). I looked through my CSS and there is nothing that I can think of that creates this. I could e-mail my theme to you if you want to have a look at it.

and thank you for being so supportive

drupalina’s picture

I can now say for certain that it is not my theme that is doing it. I pasted the CSS code that comes with OG User Roles into a clean Garland theme, and the "Configure member roles" appears in from of the group founder. I then went to Admin>>Modules and re-enabled Buddylist module.

I then logged back in as the group founder, and the "Configure member roles" tab is gone!

This is yet another pointer that Buddylist module is clashing with OG User Roles module.

has anyone else had this problem?

somebodysysop’s picture

Going back to your reply, I did and checked everything about OG_User_Roles as it is outlined in read-me file and handbook. Still, in member listings the founder of the group does not show as "Group Founder" (the name that I gave), but as "Admin" (seemingly default name that comes with OG module).

My guess is that if Buddylist is preventing the display of "Configure member roles" tab, it is probably preventing the "founder" role from being automatically assigned to new group creator.

The code (in hook_nodeapi('insert')) is very straightforward:

        if (og_is_group_type($node->type)) {
          // Get the requisite data
          $uid = $node->uid; // user ID
          $rid = variable_get('og_user_roles_founder_value', 0);
          $gid = $node->nid; // group ID
          og_user_roles_role_join($uid, $rid, $gid); // assign user to group role in that group
        }

As you can see from above, the only way this will not work is if:

1. OG doesn't recognize the node type as a "group" type.
2. You did not select a "founder" role in OG User Roles settings.
3. For some reason, og_user_roles_join fails.

This, of course, assumes that you have checked the "Default Founder Role" checkbox in OG User Roles in the first place, which you indicate you have.

When it comes to privileges in all other aspects of Roles settings, I have configured these 4 extra roles in the same way as Authenticated user. Is this a correct way of doing it, or should I just have left all those checkboxes pertaining to Blogs and comments and other modules just blank??? This is the only other reason for OG_User_Roles mulfunctioning that I could think of.

If all authenticated users have certain permissions, I usually don't add them to OG User Roles since, by definition, the users who get these roles will already have the authenticated user role. But, doubling them up shouldn't hurt. But, I can't say for sure since I never do that. You can try removing the duplicated permissions from roles to see what happens.

I've created a mechanism for perfomring a little debug. Follow these instructions here: http://drupal.org/node/164038

It won't give us a lot of info, but it will tell us what role(s) the system has calculated for a user when he is on a particular page. So, if we see the correct "Configure member roles" role displayed for a user on "og/users/$gid", then we know OG User Roles is doing it's job, but something else is preventing the display. If we don't see the correct roles, then we know someting is preventing OG User Roles from doing it's job. Either way, we know more than we know now.

somebodysysop’s picture

Oops. Sorry. The patch for the debug mechanism I referred to is here: http://drupal.org/files/issues/og_user_roles.module.5.x-2.1.patch

somebodysysop’s picture

Status: Active » Postponed (maintainer needs more info)

I don't have BuddyList installed, so unless you follow up on this issue, I'm going to close it because every test I run indicates that the "Configure member roles" tab does appear as it's supposed to in normal installations.

drupalina’s picture

sorry for a late reply (been way too busy).

I didn't test the patch that you gave, simply because I don't know what to do with patches. I mean what do i actually do with it? (I'd love to learn, but the info in handbook is totally confusing)

With new 2.1 version there was a brief glimpse of time when all Group Founders could see "configure member roles" tab inside their own groups on my localhost installation. Now not all Group Founders can see that. As for my live site it caused a Fatal error -- which I kind of fixed -- but the Configure Member roles tab still does not appear.

I don't know what I should do. Buddylist functionality is too important to me (even though I heard that it is a bit messy and a new Buddylist module is being written from scratch).

somebodysysop’s picture

Unfortunately, don't have a solution for you. The mere fact that it "worked before" and now "sort of works" indicates an instability somewhere. But, what it is caused by and why, I don't have a clue.

So, let's look at the "Configure member roles" page:

og/users/(GID)/roles

If this page is being cached, if we can clear it, that would force OG User Roles to load the correct role(s) for the user.

So, to test this theory, please clear your cache (cache, cache_page?), then see if users can access the page.

Also, try the og_user_test debug table to see what you get back on this page.

somebodysysop’s picture

If you don't already have it, download and install "Database Administration": http://www.drupal.org/project/dba.

Go to: Admin->Site Building->Database

Click on cache_page

See what urls are cached. See if one of those urls is the "Configure member roles" url.

David Stosik’s picture

Version: 5.x-2.0 » 5.x-2.1
Status: Postponed (maintainer needs more info) » Active

Having exactly the same problem here: "Configure member roles" link didn't want to display. After reading this issue, I tried deactivating "Buddy list" module, and this "Configure member roles" link instantly re-appeared.
I tried debug, and I noticed that "og_user_roles_all_roles" still returns the complete appropriate list of roles, depending on user and group. Version of BuddyList is 5.x-1.0 .

Regards,
David

somebodysysop’s picture

This is what's in og_user_roles_menu() (hook_menu). By normal Drupal standards, this should be enough to display the tab (assuming user has permission):

     ...
    // Add another tab to the group subscribers page for admins to
    // configure member roles
    if (arg(0) == 'og' && arg(1) == 'users' && is_numeric(arg(2))) {
      $gid = arg(2);
      if (og_user_roles_is_allowed($gid)) {
        $items[] = array(
          'path' => "og/users/$gid/roles",
          'title' => t('Configure member roles'),
          'callback' => 'og_user_roles_page',
          'callback arguments' => array($gid),
          'access' => user_access('configure member roles'),
          'weight' => 5,
          'type' => MENU_LOCAL_TASK
        );
      }
    }
    ...

Since I don't have BuddyList or use it or have any need for it, I would suggest you post this issue in the BuddyList issues. We just need to find out what it could possibly be doing that would prevent this tab from appearing on this page og/users/(GID).

I am assuming that:

a) The correct role(s) are returned in your og_user_test table for this URL, and;
b) At least one of the roles in question contains the "configure member roles" permission.

David Stosik’s picture

What you assumed is right in my case.
I followed here.

john morahan’s picture

Anyone having this problem, please test the buddylist patch here.

somebodysysop’s picture

Status: Active » Fixed
somebodysysop’s picture

Status: Fixed » Closed (fixed)