Posted by catch on June 23, 2008 at 10:22am
| Project: | Drupal core |
| Version: | 5.x-dev |
| Component: | forum.module |
| Category: | bug report |
| Priority: | critical |
| Assigned: | catch |
| Status: | closed (fixed) |
Issue Summary
forum_uninstall has this line in it:
db_query("DELETE FROM {node} WHERE type = 'forum'");
1. It's not using the node API - so {comments}, CCK fields, {node_revisions}, {node_comment_statistics} and anything else will be left stale in the DB.
2. AFAIK, book.module doesn't delete book nodes etc. forum topics can and are used in places other than forums.
3. No warning is given that it's going to simply delete all that data
IMO, just remove it.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| forum_uninstall_craziness.patch | 680 bytes | Ignored: Check issue status. | None | None |
Comments
#1
It's an open question what should happen with the orphan data associated with these nodes, but yes, simply deleting the node table rows is wrong and in many cases will leave the install in a worse state than leaving them there.
Looks like we should delete this line as suggested and wait for a real solution.
#2
I've committed this to DRUPAL-6 and CVS HEAD. The behavior is inconsistent with that of other node modules, it seems. At least, it is consistent now.
#3
Thanks.
Here's a version for D5 - exactly the same issue there.
#4
Committed to 5.x.
#5
Automatically closed -- issue fixed for two weeks with no activity.