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.

AttachmentSizeStatusTest resultOperations
forum_uninstall_craziness.patch680 bytesIgnored: Check issue status.NoneNone

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

Status:needs review» fixed

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

Version:7.x-dev» 5.x-dev
Status:fixed» needs review

Thanks.

Here's a version for D5 - exactly the same issue there.

AttachmentSizeStatusTest resultOperations
forum_uninstall-d5.patch650 bytesIgnored: Check issue status.NoneNone

#4

Status:needs review» fixed

Committed to 5.x.

#5

Status:fixed» closed (fixed)

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

nobody click here