Installed Drigg and immediately got the error when I tried to access Drigg Queue-PUB
user warning: Table 'DBNAME.node' doesn't exist query: SELECT * from node n where n.type='drigg' AND n.created > UNIX_TIMESTAMP(CURRENT_TIMESTAMP()) and n.status=1 ORDER BY n.created in xxxxxxxx\includes\database.mysqli.inc on line 154.
The problem is drigg code does not follow standard drupal coding convention which translates {node} into tableprefix_node (provided "tableprefix_" is defined as table prefix at the time of drupal install).
Table prefix is important for multisite installation and sharing data between multiple sites. For example if I want to install drigg as a subdomain for my main site but share users from main site.
All instances of table names in all SQL queries need to be replaced by {tablename} instead of plain table name.
E.g on line 69 of code drigg_approval_queue.module should be
$sql = "SELECT nid from {node} n where n.type='drigg' AND n.created > UNIX_TIMESTAMP(CURRENT_TIMESTAMP()) and n.status=0 ORDER BY n.created DESC";
Comments
Comment #1
mercmobily commentedHi,
Thank you for your report. This is now fixed in CVS.
In the future, please just report which file/line number has the problem, and I will fix it. No need for long preambles.
Those curly brackets sometimes slip. I also fixed all of the other missing ones from the same file you reported.
If you have any more, please let me know and I will fix them.
Thanks.
Merc.
Comment #2
mercmobily commentedComment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.