Enabling this module creates following records:
Node types:
node_gallery_gallery
node_gallery_image
Imagecache presets:
node-gallery-cover
node-gallery-display
node-gallery-thumbnail
Uninstalling this module does not delete these records and the related image files stored on the hard drive.
It is a best practice that no data specific for/ related to a module remains after a module is uninstalled.
More info: http://drupal.org/node/250783
This may need a patch of the file 'node_gallery.install'
Comments
Comment #1
dddave commentedRelated issue: #486750: File folder left behind upon gallery delete
Comment #2
kmontyIt should definitely remove the imagecache images, that is a good catch.
It was always my opinion that we should leave the nodes types / imagecache presets in the event a user decided to use them in another place (displaying a cck imagefield on a "page" content type, for example). If they uninstalled the node_gallery module, they might have some other issues.
I know the makes of CCK Gallery had a similar opinion regarding leaving behind their content type. What if the user does not want to lose the content type. Thoughts?
Comment #3
not_Dries_Buytaert commentedBy design, the whole point of uninstalling a module with Drupal is to delete ALL data that was created using that module. So, the user either uninstalls or does not uninstall a module. Leaving redundant data (just in case it might be useful later) would only bloat the database and expand its size without any limits.
Imo this case is comparable to what happens:
1) to content when its content TYPE is being deleted. Whenever a content type is being deleted, Drupal 6.x displays following warning:
2) to images when a image cache preset is deleted. Whenever a image cache preset is being deleted, Drupal 6.x displays following warning:
Comment #4
dddave commentedI also think that complete deletion of ALL data is the right way to go. If an user decides to completly get rid of this module by deleting it, I don't forsee a scenario this user really wants to reuse the imagecache presents and much less the node type.
Comment #5
justintime commentedI'm in the same boat. When I uninstall something, it should remove *all* data that was created by it, returning my system to the way it was. This includes entries in the variables table, nodes, content types, db tables, views -- everything. If I want to keep the data, but stop using the module, I can disable it without uninstalling it. The devel module even has a batch uninstall/install mode expecting this sort of thing to happen.
We can't "pause" the uninstall procedure and warn the user, but we can add messaging telling them post-mortem that we removed all that stuff. I can also add messaging to update.php that will inform users that we will be deleting data upon uninstallation to warn any users that may be uninstalling and expecting data to be there.
This is an issue I can resolve now, and not have to refactor it with the upcoming 3.x branch. I'll see if I can't knock it out.
Comment #6
alan d. commentedSubscribing. I'm writing a D7 user gallery which will need this feature :)
Comment #7
kmontyI think this got fixed?
Comment #8
justintime commentedIt's fixed - I had a change of heart though. I forget that what I want and expect is not what 99% of the users of this module want/expect.
It deletes all the NG tables and whatnot, but it does leave the content types, the imagecache presets, and in 3.x, it leaves the imagefields. Irreparable (or close to it) damage can be done if we delete that stuff and there are still nodes that are using it.
My answer was to give the user the rope, but let them put it around their neck :)
At the end of uninstallation, there are quick links, all with a target=new to pop a new window where the user is given the option to delete said content themselves.