Closed (outdated)
Project:
Drupal core
Version:
6.x-dev
Component:
node system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Nov 2006 at 09:03 UTC
Updated:
2 Mar 2016 at 22:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Suuch commentedMoved to project queue
Comment #2
acThanks for moving that to the right place. It seems that book page is not being removed from the 'node type' table.
Comment #3
acwhich probably means this is a book.module issue. heh.
Comment #4
webernet commentedThis appears to be a valid bug, the entries for node types are not being removed from the node_type table after disabling and uninstalling any of blog.module, book.module, forum.module, and poll.module.
Comment #5
webernet commentedDuplicate of: http://drupal.org/node/93400
Comment #6
acI would prefer that that be marked as a duplicate of this (and not because this was posted first). That post does not mention the taxonomy issue which is most definitely a bug. I have noted this on the other issue.
Comment #7
acTo clarify, the bug is that you can associate disabled and uninstalled core modules with vocabularies. The reason for this is because they remain in the 'node_type' table.
Comment #8
chx commentedComment #9
chx commentedFirst, untested attempt.
Comment #10
chx commentedAbout the mysql requirement -- we thought we will rise the requirement to 4.0 already, just we have not found any use for it. Now we do. Given the recent agreement using 4.1 in Drupal 6 and the surrounding posts, I can't remember anyone posting 'but hey we are at 3.x still'.
Comment #11
chx commentedIt's a patch. Frightening it might be, but still: a patch.
Comment #12
moshe weitzman commentedi think this code is too infrequently run to merit raising the mysql version requirement.
Comment #13
chx commentedOne could rearrange the code so that mysql 4.1+ and pgsql runs subqueries , mysql 4.0 runs the multitable delete and I leave mysql 3.x for the next patcher.
Comment #14
acWhen uninstalling get the error
where n.type equals any one of the patched modules. Otherwise the patch
As well as this the forum uninstall does not remove the forum vocabulary or the forum content type (maybe by design) and the blog module requires function blog_uninstall.
Comment #15
ac*Otherwise the patch works fine
Comment #16
drummI'm guessing ac was using mysql 3.
A loop would be more code, but work all the time and consistently across database versions. Maybe it would take too long to execute if there are too many nodes.
This code is just too rough to commit. Either it should work on the versions of MySQL we support, or handle not working on MySQL 3 with a better error. I didn't notice a clear indication that it was okay to drop MySQL 3 support for Drupal 5.
Either clean it up or postpone for 6.
Comment #17
acMySQL 5 here.
Comment #18
ChrisKennedy commentedCleaned up and synced with HEAD. The initial patch had forum.module incorrectly remove the poll type. This version also adds blog_uninstall() and fixes the sql error, which was because the table name is node_revisions, not node_revision.
Comment #19
drummThis shouldn't change Drupal's required MySQL version.
Comment #20
eaton commentedI'm still concerned by the idea of deleting nodes when a module is uninstalled. I just went through the following process on a client's site:
If uninstalling the module deletes all nodes of that type, then there is a ticking time bomb waiting on the 'uninstall' screen: if the client ever decides to click that button, since forum.module isn't being used, it will immediately delete all of their site's forum posts.
Comment #21
moshe weitzman commented@eaton - thats just a bug. forum uninstall should assure that it owns the node type = 'forum' before deleting such nodes. just a simple if() will do.
Comment #22
morbus iffSubscribing.
Comment #23
FiReaNGeL commentedIt should not only check if it owns the nodes / content in question, but there should be a prompt to ask the user if he wants to delete the content. What if I want to disable forum.module for a week?
Comment #24
moshe weitzman commented@fireangel - uninstall is different from diable. what you describe is disable. uninstall specifically is there so that modules can do this sort if cleanup. uninstall is destructive by design. there are lots of warnings during the process.
Comment #25
FiReaNGeL commentedThanks for the clarification moshe. I think Eaton's comment misled me into thinking that it would also delete the associated content ;)
Comment #26
rconstantine commentedWhatever happened to this? I'm developing a module that depends on correct info in the node_type table and I'm finding it isn't. Is there a patch for Drupal 5.1 available? Also, if I can add my two cents worth... it seems to me that Drupal core should be handling the deletion of content type info (at least from 'node_type' and possibly also 'content_type_XXX') when a module is uninstalled since modules don't seem to interject themselves there in the first place. Can anyone tell me what's going on?
Thanks.
Comment #27
pwolanin commentedThis should probably be fixed is system module- but I posted a patch here that's a minimal fix: http://drupal.org/node/147061
Comment #28
forngren commentedWhy is the MySQL min version changed?
We should also tell the user WITH A BIG ANGRY MESSAGE that he is deleting all nodes of this type.
Reroll and I'll review :)
Comment #29
dpearcefl commentedis this issue in current 6.x? Is any one interested in pursuing it any more?
Comment #30
doitDave commented@dpearceMN, #29:
Yes, it is still. Just uninstalled forum.module in 6.22. It left alle forum nodes and their comments untouched, but also removed the node_type info. So the abandoned nodes are now of the type "" in the frontend and "forum" in the database. Even worse, when trying to edit such an abandoned node, you will receive:
This is really bad behavior IMO. At a glance, I can see several solution options for that:
Maybe we can have some opinions on this. At least for D6, I would even contribute myself, but I have to admit that I am not even having full project access as by now (pending). Which, of course, wouldn't keep me from proposing some patches in case there is a demand.
Perhaps I am thinking wrong here and all that may be solved with a contrib module. I would be interested in further opinions.
Comment #31
doitDave commented(Unfollowing)