When I save the member roles page I get the following errors in the error log and the settings aren't saved;

Missing argument 2 for og_user_roles_mail_alter() in /home/ubu/public_html/sites/all/modules/og_user_roles/og_user_roles.module on line 3769.

Looks like an undocumented feature using hook_mail_alter and Drupal changed the syntax.

Comments

somebodysysop’s picture

Status: Active » Needs review
StatusFileSize
new1.98 KB

Syntax for hook_mail_alter() has changed from 5.x to 6.x. The attached patch should resolve the problem.

benorgan’s picture

I have applied the patch (I think) but am still getting the same problem (but without the error message).

When I press save on the "Configure member roles" page the box unticks itself when the page loads up again if that role is being automatically applied. Is this correct behaviour or is something still wrong? There's no errors in the error log.

somebodysysop’s picture

What you describe is not correct behaviour.

On my site, gave group member the "Configure member roles" permisson. User is able to tick and untick roles on this page without issue or error.

You will need to provide more detail on your setup and configuration.

sjf’s picture

I have the same problem. I think I've narrowed it down to the "Default Group Role for new group administrator" setting. Try replicating by doing the following:

1. Create two new roles - group editor and group leader
2. In og_user_roles config, allow both as assignable roles
3. In og_user_roles config, set group editor as "Default Basic Group Role for new group subscribers."
4. In og_user_roles config, set group leader as "Default Basic Group Role for new group administrator."
5. In your group, add a new member. Check the configure member roles tab - that member has correctly received "group editor" role.
6. Make that new member an Administrator from the "Create Admin" link in the list tab.
7. Check the configure member roles tab again - the "group leader" role has not saved, nor is it possible to manually apply that role from the checkbox (the checkbox setting is not saved).

If I don't set a Default Basic Group Role for new group administrator, I can manually apply/remove the "group leader" role from the configure member roles tab without any problems.

As benorgan said, the patch fixes the error message but the problem above still remains. HTH.

somebodysysop’s picture

Title: Member roles error on save » Default Basic Group Role for new group administrator (was: Member roles error on save)
StatusFileSize
new5.19 KB

Try this patch. I think it resolves this issue. Let me know.

somebodysysop’s picture

Status: Needs review » Fixed
sjf’s picture

Yes, that seems to have fixed this. Thanks.

Status: Fixed » Closed (fixed)

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