- My environment
- drupal: 4.6.5
- DB: postgresql 7.4.7 (patched with http://drupal.org/node/28996 already)
- OS: debian sarge
Things happened when I move forward to log>bad behavior to see logs. It presented me no log, just error messages which I list below.
pg_query(): Query failed: ERROR: relation "bad_behavior_log" does not exist in /usr/share/drupal/includes/database.pgsql.inc on line 45.
query: SELECT COUNT(*) FROM bad_behavior_log w in /usr/share/drupal/includes/database.pgsql.inc on line 62.
pg_query(): Query failed: ERROR: relation "bad_behavior_log" does not exist in /usr/share/drupal/includes/database.pgsql.inc on line 45.
query: SELECT w.* FROM bad_behavior_log w ORDER BY w.date DESC LIMIT 50 OFFSET 0 in /usr/share/drupal/includes/database.pgsql.inc on line 62.
Comments
Comment #1
dpangier commentedThe core Bad Behavior requires mySql (at present). So, this won't be fixable at the module level. The upstream author has been informed of the request.
Comment #2
senpai commentedI wanted to re-open the O.P.'s post because I am seeing this problem on a newly developed LAMP-driven site. When I go to Administer > Logs > BadBehavior, I see two MySQL warnings. Both of them say that the table bad_behavior_log doesn't exist. I've pasted the two warnings below.
user warning: Table 'XXXX.bad_behavior_log' doesn't exist query: SELECT COUNT(*) FROM bad_behavior_log w in /usr/local/4admin/apache/vhosts/XXXX.com/httpdocs/development/includes/database.mysql.inc on line 120.
user warning: Table 'tourlink.bad_behavior_log' doesn't exist query: SELECT w.* FROM bad_behavior_log w ORDER BY w.date DESC LIMIT 0, 50 in /usr/local/4admin/apache/vhosts/tourlinkconference.com/httpdocs/development/includes/database.mysql.inc on line 120.
I thought about just going into the database and creating these tables by hand, but I'm not sure what their structure or intended purpose might be. I cannot find the snippet of PHP code within Bad Behavior that references these tables, so I suspect it may be a class within Drupal that's doing the heavy lifting.
I'm lost. Help?
Comment #3
senpai commentedThere's a newer version of bad behavior that I downloaded and installed. I also copied the section of CREATE TABLE out of the .sql file, and ran it manually in my database in order to create the log table. All is well now, I'm happy to say.
Comment #4
senpai commentedDue to no further discussion or comment from the maintainer, I'm gonna mark this a fixed. If it worked for me, it should work for everyone else too, right? ;=)
Comment #5
(not verified) commented