On sites that use the syslog module, the watchdog table doesn't exist.

This causes the following fatal PHP error in Droptor:

Dec  6 16:11:18 Main drupal: http://www.example.com|1354831877|php|96.126.109.115|
http://www.example.com/droptorfeed/761bb5f7a5c05faf0a535483c360bdc6e9a51111||0||
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'watchdog'
doesn't exist: SELECT COUNT(*) FROM {watchdog}; Array#012(#012)#012 in
droptor_watchdog_size() (line 318 of /var/www/html/example.com/releases/
20121128192654/drupal/sites/all/modules/droptor/droptor.feed.inc).

Steps to reproduce:

  • Install droptor
  • Disable and uninstall dblog module
  • Attempt to sync droptor

Comments

jemond’s picture

Status: Active » Fixed

Just pushed a fix to the dev branches for 7.x-3.x and 7.x-4.x versions. Let me know if this doesn't work. Thanks for reporting!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

traviscarden’s picture

Title: Fatal PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table watchdog » SQL Error looking for non-existent watchdog table
Status: Closed (fixed) » Needs review
StatusFileSize
new2.92 KB
new1.53 KB

Uh-oh. The module is called "dblog", not "watchdog", so the new module_exists() tests are always going to return FALSE, and watchdog data will never be sent. Better fix this one before the next release! Attached are a patch for D7 and one for D6.

p.s. - You might want to check out the Drupal coding standards. Windows line-endings and such make for difficult patching. :)

jemond’s picture

Oh mega brain fail. Will take a look. Not sure why there are Windows line endings, I'm on a Mac.

jemond’s picture

Status: Needs review » Closed (fixed)

Thanks for the patches. Pushed to 6-3.x, 6-4.x, 7-3.x, and 7-4.x.