I deleted a notebook page from our Open Atrium site and got this warning:
user warning: Table 'cgraphics.projects_time_tracker_timer' doesn't exist query: DELETE FROM projects_time_tracker_timer WHERE nid = 5331 in /home/projects/public_html/sites/all/modules/time_tracker/time_tracker.module on line 609.
Time tracking was not enabled on our notebook content type.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | time_node_delete.patch | 716 bytes | chertzog |
Comments
Comment #1
deekayen commentedIt might also help to note the database is named cgraphics, the table prefix is projects_.
Comment #2
drclaw commentedHmmm... That's a strange bug... I'll take a look.
Comment #3
chertzogYeah, line 608 of time_tracker.module:
I would think that we should probably wrap that in a module_exists('time_tracker_timer'). And while we are at it probably check time_estimate as well.
Attached is a patch.
Comment #4
drclaw commentedHmmm.... I should probably port that over to D6 as well...
Comment #5
chertzogYeah, the patch in #3 is against the D6 dev. I should probably put something like this in for D7.
Comment #6
drclaw commentedI see. Nice one.
Comment #7
chertzogI am in the process of adding this to D7, and noticed i missed a parenthesis in the second module_exists
should be
Comment #8
drclaw commentedI think it makes more sense to add the deletes to their respective module's nodeapi implementations. In fact, the time_estimate module actually already had a delete case for nodes. I just had to add it to the time_tracker_timer module. Fix is pushed to dev branch.