user warning: Table 'drupalprueba.xmlsitemap' doesn't exist query: DELETE FROM xmlsitemap WHERE type = 'custom' in /home/manfer/public_html/drupalprueba/sites/all/modules/xmlsitemap/xmlsitemap_custom/xmlsitemap_custom.install on line 13

If xmlsitemap is uninstalled first the xmlsitemap table doesn't exist.

Comments

dave reid’s picture

The better question is, why does Drupal allow the base module to be uninstalled first when all the sub-modules depend on it... Odd.

manfer’s picture

Lol, I didn't thought of that. Yes looks a buggy core feature. :)

I'm testing with a 6.12 version so can't confirm if it is still present on 6.13. But anyway it is drupal core issue.

dave reid’s picture

Title: uninstall warning » Document that must uninstall submodules first, then base module
Category: bug » task
Issue tags: +Needs documentation

Yeah this is def. a core bug: #151452: Uninstalling modules does not follow dependencies and can lead to WSOD. There are so many dependencies between the base xmlsitemap module and the sub-modules that it would be a pain to work around. For now, just uninstall the sub-modules separately first, then uninstall the base module. I'll try to update documentation for this.

dave reid’s picture

Component: xmlsitemap_custom.module » Documentation
Anonymous’s picture

The only method to fix the core bug is to have hook weights independent of module weights and that isn't going to happen anytime soon. Is it possible to resolve the issue with module weights?

dave reid’s picture

We're already using module weights in 6.x-2.x. All the submodules have a weight of 0, while the base module's weight is 1. I think xmlsitemap_engines is 2 though. If the uninstall ran on weights, the submodules would be first, but that's not the case: it's alphabetical and hence xmlsitemap.module uninstalls before xmlsitemap_custom.module.

The bigger problem is that we install modules by a dependency system, but we don't do the same on uninstall.

dave reid’s picture

Status: Active » Fixed

Added this to the README.txt.
http://drupal.org/cvs?commit=304608

Status: Fixed » Closed (fixed)
Issue tags: -Needs documentation

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