When I log in to my site and I have the civicrm_group_roles module enabled, I'm getting this generic error in the browser:

The website encountered an unexpected error. Please try again later.

In the database log, I see this error message:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table
'singersin_drupal.singersin_combined.civicrm_group_roles_rules' doesn't exist:
SELECT r.name AS name, cgr.role_id AS role_id, cgr.group_id AS group_id FROM 
{civicrm_group_roles_rules} cgr INNER JOIN {role} r ON r.rid=cgr.role_id; Array ( ) in 
civicrm_group_roles_sync_roles() (line 821 of 

Note the table name singersin_drupal.singersin_combined.civicrm_group_roles_rules - that's actually the Drupal database name, followed by the CiviCRM database name, followed by the table it's looking for. So I assume that somehow the {civicrm_group_roles_rules} token is getting filled in wrong when the site has different databases for Drupal and CiviCRM.

I can work around this by disabling the civicrm_group_roles module (drush dis civicrm_group_roles).

I'm using:

  • CiviCRM 5.32.2
  • Drupal 7.76
  • Just noticed I didn't exactly ask a question. The question is: how can I fix this, and/or should I open a bug in the CiviCRM tracker somewhere? Jan 7, 2021 at 4:02

1 Answer 1


Drupal 7.76 was only current for about a day, because of this bug (which affects other integrations, but hits CiviCRM especially hard). Upgrade to Drupal 7.77.

  • Thanks, I must have had particularly bad timing. Will do. I saw things about "table name quoting for MySQL 8" in the release notes for 7.77, but figured it didn't apply since I'm using mysql 5.7.x. Jan 8, 2021 at 23:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.