Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
documentation
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
15 Jun 2008 at 20:14 UTC
Updated:
27 Sep 2008 at 08:41 UTC
Jump to comment: Most recent
I think it needs some more detailed wording. How about:
Remove any information that the module sets itself. This includes:
- variables the module has set using
variable_set- variables the module can set indirectly in its forms, like the settings form
- blocks that the module defines
- tables the module created
The module should not remove its entry from the
{system]table.The uninstall hook will fire when the module gets uninstalled.
Remove any information that the module sets itself. This includes:
- variables the module has set using
variable_set- variables the module can set indirectly in its forms, like the settings form
- blocks that the module defines
- the module schema
The module should not remove its entry from the
{system]table.The uninstall hook will fire when the module gets uninstalled.
See for instance http://drupal.org/node/211175 about these practices.
Comments
Comment #1
fgmForgot to set status. It's not a patch as such, but the suggested content is in the previous post.
Comment #2
Barry Madore commentedMoving
Comment #3
fgmAlso, node modules should probably remove the nodes of the types they manage.
Comment #4
Anonymous (not verified) commentedSince there is no real patch in this issue changing back to active. The issue #211175: GHOP #156: Write hook_uninstall: Task 2 you referred to is closed.
Comment #5
dave reidI just worked on editing a new possible hook so I'll take a stab at this soon.
Comment #6
dave reidI'm not going to write anything about removing blocks, because that gets messy; you'd need to remove actions, filters, node types (and nodes of those node types), permissions, etc. I'm working on uninstalling those items automatically in core with #306151: Automatically install/uninstall schema.
Just committed my change to the 7.x documentation. It should be available at http://api.drupal.org/api/function/hook_uninstall/7 shortly. Take a look and let me know what you all think. If it looks good, I'll start backporting the documentation to 6.x and 5.x. Marked as fixed for now.
Comment #7
dave reidDon't know how long the API takes to regenerate, but here's the commit: http://drupal.org/cvs?commit=139777
Comment #8
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.