When I attempted to install the XML sitemap menu module I was hit with a number of DB errors.
I accidentally erased the error itself but it is fully reproducible and I even have a quick and easy solution :-)

To reproduce:
uninstall the "Core - optional" Menu module.
try to install xml sitemap menu module.
Big blaring errors :-)

To fix:
add the Menu module to the list of dependencies for xml sitemap menu

Comments

avpaderno’s picture

Title: XML Sitemap Menu Installation error! » The module doesn't declare its dependency from menu.module
Component: xmlsitemap.module » xmlsitemap_menu.module
Assigned: Unassigned » avpaderno

Effectively, the module doesn't declare the dependency from menu.module; therefore, Drupal allows you to enable xmlsitemap_menu.module even if the Drupal core module is not enabled.

I don't know why, but I took that menu.module was not optional.
Nice catch.

avpaderno’s picture

Status: Active » Fixed

I changed the code in CVS, and fixed the problem.

I hope it's ok if I already did it, as all I had to do was to add dependencies[] = menu in xmlsitemap_menu.info; since the change doesn't involve code, I thought I could apply the change directly.

Thanks for the report.

avpaderno’s picture

Title: The module doesn't declare its dependency from menu.module » Some modules don't declare its dependency Drupal optional modules
Component: xmlsitemap_menu.module » Code
Status: Fixed » Active

I just noticed that the same problem could happen to another module.
I will investigate on this.

avpaderno’s picture

Title: Some modules don't declare its dependency Drupal optional modules » Some modules don't declare their dependency from Drupal optional modules
Status: Active » Fixed

It happened with xmlsitemap_taxonomy that didn't declare its dependency from taxonomy.module, even if it is using functions of that module.

I also changed the declaration of dependency from xmlsitemap_node.module into the one from xmlsitemap.module.

As collateral effect, I removed the declaration of dependency of xmlsitemap_term.module that is now an empy shell. The files will be removed later.

Anonymous’s picture

I hope it's ok if I already did it, as all I had to do was to add dependencies[] = menu in xmlsitemap_menu.info; since the change doesn't involve code, I thought I could apply the change directly.

Sarcastic remarks require sarcastic answers. ;p

Status: Fixed » Closed (fixed)

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