Hi All,
THis is a three stage question;
1) Am I missing something here, or does Drupal NOT remove content from the site when the specific modules that are used to serve that content are uninstalled? I just installed the weblinks module, added a link along with a comment and a token vote using nodevote. When I deactivated the module and dropped the weblink database tables the title and description content, as well as the comment and vote remained. However any module specific data was removed, which in this case was the actual link to the site. I also noticed that if you deactivated the weblink module, delete any orphaned content, then reactivated it without dropping/truncating the module database tables you would be given a "Duplicate entry" error for the URL field when trying to add your link again.
2) If I understand the thread below correctly, then I gather that hook_taxonomy does not have any support for validation, meaning that if you deactivate a module Drupal has no way of being made aware that it should remove/migrate all associated content (including comments, votes, etc). If this is correct, then wouldn't this present HUGE issues for large content sites if they where to want to remove/migrate content from a partiular module? This isn't something that would happen on a regular basis, but I have several thousand pages of content I am looking to migrate to Drupal, and in my sites lifetime I have shifted content around a few times to get the functionality I've wanted. Only way around this I can think of is to migrate all your data (if need be), and then goto administer->content, set the filter to the content type you are removing, select each one, and then select delete from the drop down menu. Once this is done, then go and deactivate your module and drop the tables. Still a massive/boring task as there is no "Select All" function there, and if you had several hundred web link entries to delete it would become a tedius task very quickly.
3) Assuming that Drupal can't automatically remove content and related data (comments, votes, etc) when you deactivate a module, how hard would it be to have a module/hack developed that provides this functionality? Something that perhaps runs via cron.php and gives you the option to move or delete any content and associated data should it find anything.
Comments
One issue with content removal...
At least, content removal based on module deactivation - most of the time, I'm deactivating a module as a troubleshooting, or load-easing measure... So, it would suck if I flipped off the module, and suddenly lost all the associated content.
I definitely think that orphaned content, generally, is a problem for Drupal - just look at what happens when you delete a USER who has contributed a lot of your site content...
Maybe if just deactivated
Maybe if just deactivated the content of the module should still show, but once you drop the associated tables it shouldn't.
I hadn't even thought of users, I'll have to check that out. I have a whole stack of users and content to migrate, but to me being able to effectivle and easily remove any of those users and/or content at anytime is as important as being able to add them. This could present a very significant speedhump into my migration plans...
The problem...
...Is that all content in drupal is stored in a central 'node' table. Those auxiliary tables only hold the extra information. The proper solution for 'nuking' a series of nodes is NOT to disable the module you used to make them, then nuke the 'extra' tables.
Instead, go to the admin > content menu, and filter based on node type. Select all the nodes of the type you're removing, and upublish or delete them. THEN, you can disable the module. Actually deleting the NODES this way properly removes all the extra data associated with them.
--
Jeff Eaton | I heart Drupal.
--
Eaton — Partner at Autogram
Ok, the content deletion
Ok, the content deletion procedure sounds like it is something you have to be very concious of with Drupal. I don't think the phonetics of having to be aware that you need to delete a modules content before you remove the module is right though, and it will be some what cumbersome if you are wanting to remove a module with several hundred nodes published under it. This will trip up many people up I would expect, especially those new to Drupal. At least the functionality is there through the Drupal admin interface though.
What about deleting users then? From what I can see in Drupal there is no way to sort/group content by user in the adminstration area, which I would assume would mean there is no way to modify content by author en masse? When I created a few stories with a test account and then deleted that user, all the content by that user was gone but it was replaced by a "N/A" message. From here there is no way I could see for removing this through the Drupal control panel, and it required having access to my database, and the knowledge of how to manually remove these entries from it. This is not very user friendly, and the worst I've seen of any of the top OS CMS packages I have looked at. This is not a complaint, I just find it very suprising when Drupal is so far ahead of the pack in terms of management of users/content creation that it pretty much falls flat on its face when it comes to deleting users/content.
You're correct. :)
It is a notable shortcoming, and a number of core coders are very much aware of the fact that enhanced content management functions are needed. Right now, almost all energy is focused on getting Drupal 4.7 out the door. It'll provide a very firm foundation for the sort of usability and workflow enhancements needed in the future.
--
Jeff Eaton | I heart Drupal.
--
Eaton — Partner at Autogram
Cool :)
As long as it is a problem the devs are aware of and are planning to rectify then I will probably still continue my own migration plans. However until these pitfalls are fixed there is no way I could recommend Drupal to any of my clients who are 99% of the time non technically minded.