Active
Project:
Simplelist
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Jul 2008 at 08:51 UTC
Updated:
9 Jul 2008 at 03:29 UTC
After adding a list to Simplelist, I keep getting the following warning at the top of every page:
user warning: Table 'database_name.role' doesn't exist query: SELECT name FROM role WHERE rid IN (1,2,3) in path_to_drupal/sites/all/modules/simplelist/SimpleListController.php on line 122.
I substituted "database_name" instead of my own database. Likewise, "path_to_drupal" instead of the real path. Not sure if that was necessary, just being cautious.
Comments
Comment #1
reblevins commentedI just realized I have a special prefix in front of all my tables, so the above table name should be: database_name.my_prefix_role.
Not sure how to patch this, but maybe I'll give it a try.
Comment #2
reblevins commentedI went into the SimpleListController.php file and hard-coded my prefix on line 122:
$result = db_query("SELECT name FROM my_prefix_role WHERE rid IN (". db_placeholders($access) .")", $access);
I realize that this is not a very good fix, but it works for me. There must be a variable that I can put in there instead, but I don't even know where to start looking for something like that.
Comment #3
canen commentedThe correct fix is to change the query to
SELECT name FROM {role} WHERE...and Drupal will take care of the prefixing.I changed the title to reflect what the real issue is.