We set the $db_prefix in settings.php to "drupal_". So table names are drupal_node and drupal_googlebase.
Errors (see below) are appearing in the log from cron runs, showing SOME table names such as node and googlebase. Note that in the second query, drupal_googlebase is actually shown, but the prefix is not used for the node table.
Table 'DBNAME.node' doesn't exist query: SELECT n.nid FROM node n WHERE type IN ('listing') AND NOT EXISTS (SELECT nid FROM googlebase WHERE nid = n.nid) LIMIT 10 in /home/ACCOUNT/public_html/modules/googlebase/googlebase.module on line 539.
Table 'DBNAME.node' doesn't exist query: SELECT n.nid FROM node n LEFT JOIN drupal_googlebase g ON g.nid = n.nid WHERE type IN ('listing') AND g.timestamp < n.changed LIMIT 10 in /home/ACCOUNT/public_html/modules/googlebase/googlebase.module on line 553.
(Note: DBNAME and ACCOUNT are substitutions for the real database and hosting account names, 'listing' is the node type and each ' has been cleaned up to a ' character and < has been cleaned up to a <.)
Comments
Comment #1
ailgm commentedThis problem can be fixed by adding curly brackets around the table names in these queries, e.g. {node} and {googlebase}. Most of the queries seem to have them, so I found just these 3 to fix.
Comment #2
AlexisWilke commentedThere is part of the Coder report. It is a good idea to test your code before publishing it! There are curly brackets and some problems that are viewed as potential security problems such as the use of $types instead of the proper db calls.
Thank you.
Alexis
Comment #3
quicksilver1024 commentedCan someone please explain the solution in noob-friendly terms?
Thank you.
Comment #4
AlexisWilke commentedquicksilver1024,
If you're using a prefix in your database, then this module won't work well for you until fixed.
How's that?
Alexis
Comment #5
quicksilver1024 commentedI'm sorry. I still don't understand, haha.
I am using prefix in my database...
Comment #6
littlealy commentedHi quicksilver1024 - I hope by now that you have found a fix or used a different module.
From one n00b to another, here is the best explanation I can offer:
The issue here is that the code didn't include curly brackets in a few spots where they need to be. This bug will only pop up if you are using DB prefixes.
So until the module is repaired, you have to do this fix yourself...
Look for code where there is a QUERY sent to the DB, like this:
And repair it by adding the code:
This is just an example. I would NOT try replace all. Instead, look up MySQL queries and learn the format necessary so you can recognize the tables referenced.
Good luck.
Comment #7
longwaveShould now be fixed in the -dev branch.