Needs review
Project:
Banner
Version:
master
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Mar 2007 at 16:32 UTC
Updated:
19 Apr 2008 at 16:20 UTC
Jump to comment: Most recent file
This set of errors appeared while loading a page, and the next page load did not appear. I assume it was a routine involved in sending an update e-mail, which does not run every time the page is loaded. So repeating this error wouldn't easily be done.
BTW, I'm running Drupal 5.1.
user warning: Unknown column 'id' in 'where clause' query: _banner_mail UPDATE banner SET failed_notify = notify_failed + 1 WHERE id = 0 in /includes/database.mysql.inc on line 172.
user warning: Unknown column 'id' in 'where clause' query: _banner_mail UPDATE banner SET failed_notify = notify_failed + 1 WHERE id = 0 in /includes/database.mysql.inc on line 172.
user warning: Unknown column 'id' in 'where clause' query: _banner_mail UPDATE banner SET failed_notify = notify_failed + 1 WHERE id = 0 in /includes/database.mysql.inc on line 172.
user warning: Unknown column 'id' in 'where clause' query: _banner_mail UPDATE banner SET failed_notify = notify_failed + 1 WHERE id = 0 in /includes/database.mysql.inc on line 172.
user warning: Unknown column 'id' in 'where clause' query: _banner_mail UPDATE banner SET failed_notify = notify_failed + 1 WHERE id = 0 in /includes/database.mysql.inc on line 172.
user warning: Unknown column 'id' in 'where clause' query: _banner_mail UPDATE banner SET failed_notify = notify_failed + 1 WHERE id = 0 in /includes/database.mysql.inc on line 172.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | banner.module.HEAD_.128916-2.id_.patch | 2.48 KB | plumbley |
| #2 | banner.module.4-7.128916-2.id_.patch | 2.49 KB | plumbley |
| #1 | banner.module.128916.id_.patch | 1.72 KB | plumbley |
Comments
Comment #1
plumbley commentedBanner is trying to the following, to stop further notifications when an email fails:
But the id field (presumably intended to be "uid") is not set.
Actually it's not trivial to fix this because the user id uid is held in the {node} table, while the other information is in the {banner} table. Pending a full fix, here is a patch that simply change this (and 2 similar lines in the same region) to nid (which is in the {banner} table) instead of id/uid (which isn't).
Best wishes, Mark.
Comment #2
plumbley commentedWhile here, a couple of related bugs:
(1) Incrementing the notification failures column (1326 in HEAD) referred to the "failed_notify" column instead of "notify_failed" column
should be
(2) Loading a banner for weekly notification (HEAD line 158) forgets to load the "notify_failed" field at all, meaning it will get reset to zero at the end of each week.
The updated patches attached fix those related bugs for 4.7 and HEAD (5.x) while we're fixing the id bug. Mark