Module doesn't check for taxonomy.module

melon - August 31, 2009 - 00:52
Project:Menu Trails
Version:6.x-1.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

After enabling the module on a site where Taxonomy module is not enabled, visiting 'admin/settings/menutrails' results a php error complaining:
Fatal error: Call to undefined function taxonomy_get_vocabularies()

Please check for the taxonomy.module with module_exists() or function_exists().

Thanks.

#1

kiamlaluno - August 31, 2009 - 01:21

taxonomy.module is a core optional module; as alternative to verify if the module is enabled, Menu Trails could declare it as a dependency, if it needs taxonomy.module.

#2

melon - August 31, 2009 - 01:26

I'm aware of the fact that taxonomy is a core module. But not depending upon it and then directly calling one of its' functions is clearly a bug.

I think it would be more elegant if it only checked the presence of the Taxonomy module and then built the admin settings form depending on the result of the check.

#3

kiamlaluno - August 31, 2009 - 01:33
Title:Module doesn't check for taxonomy module.» Module doesn't check for taxonomy.module

I'm aware of the fact that taxonomy is a core module. But not depending upon it and then directly calling one of its' functions is clearly a bug.

I was not saying it was not a bug, nor that you didn't know it is a core module.
My comment was for the maintainer(s) of the module, who maybe thought taxonomy.module is a core required module when it is not so.

#4

lierbag - November 30, 2009 - 02:46

+1

Menu Trails should have Taxonomy as a dependency. Even if you don't use Taxonomy, you have to enable it or else you get error messages like :

"warning: Invalid argument supplied for foreach() in /home/content/r/s/c/rscanlon/html/sites/all/modules/menutrails/menutrails.module on line 130."

 
 

Drupal is a registered trademark of Dries Buytaert.