When attempting to uninstall the Forum module after having disabled the Taxonomy module, a fatal PHP error will occur because forum_uninstall() makes use of taxonomy_del_vocabulary(), which is no longer available. This has been tested against both beta4 and HEAD.

Steps to reproduce:

  • Enable Taxonomy and Forum modules.
  • Disable Forum module, and then Taxonomy module.
  • Attempt to uninstall Forum module.
  • Behold - white screen of death.
  • Check PHP log for fatal error.

Faral error produced by bug:
Call to undefined function taxonomy_del_vocabulary() in [...]/drupal-6.0-beta4/modules/forum/forum.install on line 41

Proposed solution:
Do what is needed from taxonomy_del_vocabulary() in a private function in forum.install instead.

Comments

gábor hojtsy’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

Well, forum module depends on taxonomy module, so you should not be able to disable taxonomy module if forum module is enabled. The taxonomy module checkbox should be impossible to uncheck. How did you disable taxonomy module?

ximo’s picture

Status: Postponed (maintainer needs more info) » Active

I got the error when uninstalling the Forum module, not when disabling Taxonomy. But it was very easy.. I first disabled the Forms module (at this point the checkbox for Taxonomy was greyed out) and pressed Save changes, then I was able to uncheck Taxonomy and save the changes again. If I managed to do it, sooner or later someone else will!

My first thought now was that the function that greys out modules under dependency should pick up even modules that have not yet been uninstalled. But this might just cause confusion - users may not get that they would need to completely uninstall the dependant modules first, not just disable them (as has been the default action).

How about not permitting modules to depend on other modules after they have been disabled (i.e. in hook_uninstall)? Because potentially, the module it depends on may have been disabled by the time you want to uninstall the module in question.. like I found out.

(Btw, sorry for the 'critical'. I got a bit carried away when I saw a white screen of death, I see now that it's unlikely to bug that many users.)

chx’s picture

Status: Active » Needs review
StatusFileSize
new437 bytes
gábor hojtsy’s picture

chx: hm, I'd add a line of comment about the forum module depending on taxonomy module, but that possibly being disabled by the time forum is uninstalled.

ximo’s picture

StatusFileSize
new799 bytes

chx's solution is so obvious now that I see it :)

I added a comment and reordered it to look pretty. Good enough?

gábor hojtsy’s picture

Status: Needs review » Fixed

Committed this one, thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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