I'm running a multi-site install to stress test certain drupal features. I was completing the install of a number of modules when I installed the decision & voting api modules.
After creating a 'decision', I get the following errors:
Table 'athcx.users_roles' doesn't exist query: INSERT INTO drupal_m4ge_ath_cx_advpoll_electoral_list (nid, uid) SELECT '6', u.uid FROM users_roles u, permission p WHERE FIND_IN_SET(' view advpoll', p.perm) AND u.rid = p.rid AND u.uid != 0 in /var/www/drupal/includes/database.mysqli.inc on line 151.
Table 'athcx.role' doesn't exist query: SELECT COUNT(*) AS hit FROM drupal_m4ge_ath_cx_permission JOIN role ON role.rid = permission.rid WHERE FIND_IN_SET(' vote on advpoll', perm) AND role.name = 'authenticated user' in /var/www/drupal/includes/database.mysqli.inc on line 151.
The errors seem centered around the fact that users_roles and role don't seem to exist in athcx. They do, but they have the prefix which correctly appears in front of 'permission' : drupal_m4ge_ath_cx_permission.
I then created a new test site with a new database user and a new database using the same code base. This time I put no table prefixes and the decision worked. The offending code also seems to exist in the advanced poll module.
This is what grep found for me:
advpoll/advpoll.module: $result = db_fetch_object(db_query("SELECT COUNT(*) AS hit FROM {permission} JOIN role ON role.rid = permission.rid WHERE FIND_IN_SET(' vote on advpoll', perm) AND role.name = 'authenticated user'"));
decisions/decisions.module: $result = db_fetch_object(db_query("SELECT COUNT(*) AS hit FROM {permission} JOIN role ON role.rid = permission.rid WHERE FIND_IN_SET(' vote on decisions', perm) AND role.name = 'authenticated user'"));
decisions/decisions.module: $result = db_fetch_object(db_query("SELECT COUNT(*) AS hit FROM {permission} JOIN role ON role.rid = permission.rid WHERE FIND_IN_SET(' vote on decisions', perm) AND role.name = 'authenticated user'"));
I'm not familiar with Drupal code but I suspect this is where the issue is.
Comments
Comment #1
yrocq commentedFixed in 5.x-1.1
Comment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.