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

dddave’s picture

kmonty’s picture

Assigned: Unassigned » kmonty

It 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?

not_Dries_Buytaert’s picture

By 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:

Are you sure you want to delete the content type {content type name}? Warning: there is currently {number} {content type name} post on your site. It may not be able to be displayed or edited correctly, once you have removed this content type. This action cannot be undone.

2) to images when a image cache preset is deleted. Whenever a image cache preset is being deleted, Drupal 6.x displays following warning:

Are you sure you want to delete the preset {image cache preset name}? This action cannot be undone.

dddave’s picture

I 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.

justintime’s picture

Assigned: kmonty » justintime

I'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.

alan d.’s picture

Subscribing. I'm writing a D7 user gallery which will need this feature :)

kmonty’s picture

I think this got fixed?

justintime’s picture

Status: Active » Fixed

It'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.

Status: Fixed » Closed (fixed)

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