[development] node_delete on module specific node

Michael Prasuhn mike at mikeyp.net
Wed Apr 29 02:35:10 UTC 2009


On Apr 28, 2009, at 7:07 PM, Matt wrote:
> I'm imagining irate users who try re-installing the module only to
> discover that they have lost hundreds of quiz question nodes. On the
> other hand, uninstalling the schema (which, for quiz, includes tables
> for fields that augment the standard node fields) will cripple the
> nodes anyway. If that is going to cause irritation, then we might as
> well just delete the entire node.

[snip]

> And then, again, we have the case where we leave the nodes, but remove
> the module-specific data that is stored in the module-specific tables.
> That, too, leaves Drupal broken.
>
> So which kind of broken do we want?

Neither.

If you are really using Drupal's APIs properly, the amount of breakage  
is rather small.

Here's a poll node I made:
http://img.skitch.com/20090429-c13tjq8uijniq4twrxrxxxkdxd.png

Here's the same poll node after turning off the poll module:
http://img.skitch.com/20090429-kpkhegfackipiqbdjas26hqcud.png

Not too bad. The only error I could find was from attempting to edit  
the poll.

If you are disabling modules on your site and not smart enough to go  
and delete or unpublish the content created, I don't know if that's  
something we should watch for. It's not inconceivable that a user  
could disable or un-install a module unintentionally, so I think core  
has already adopted the best approach here.

-Mike

__________________
Michael Prasuhn
mike at mikeyp.net
http://mikeyp.net







More information about the development mailing list