I get the following fatal error after installing and enabling this module and then enabling the blocks -

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 1: SELECT og_users_roles.uid AS uid FROM {og_users_roles} og_users_roles WHERE (gid = :db_condition_placeholder_0) AND (rid IN ()) ; Array ( [:db_condition_placeholder_0] => 1 ) in og_extras_get_users_by_roles() (line 77 of ...og_extras\og_extras.module

Also shows the warnings -

Notice: Undefined variable: role_rids in og_extras_preprocess_og_extras_group_info() (line 47 of ...modules\og_extras\theme\theme.inc).
Warning: Invalid argument supplied for foreach() in DatabaseCondition->compile() (line 1854 of ...includes\database\query.inc).

I am using a fresh Drupal install with only the OG and this module along with the other required modules.

Comments

David Lesieur’s picture

This happens when none of the group's members has a group role. The error disappears when you assign a role to at least one group member.

You may also want to go to admin/config/group/settings, and assign a default role to group managers. At least the group creators will automatically get a role, preventing the error on new groups.

This is just a workaround though, not a real fix.

a6hiji7’s picture

Status: Active » Needs work

Thanks, I had figured that out. This looks like a fixable bug. I have not checked it since then, as I decided to go with OG 1.x version. But I will look again and if I am able to find a solution then will submit a patch. Thanks!

KarenS’s picture

Status: Needs work » Fixed

This should already be fixed in the dev version of the code. If you can reproduce an error in the dev version you can reopen with details.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Fixed grammar.