Problem/Motivation
(Why the issue was filed, steps to reproduce the problem, etc.)
Disable "taxonomy" module and cal any taxonomy page. E.g. /taxonomy/term/4/all/feed
The result will be:
[Wed May 22 04:40:59 2013] [error] [client 173.194.99.16] PHP Fatal error: Call to undefined function taxonomy_term_load() in /home/u3301/domains/activmap.ru/sites/all/modules/boost/boost.module on line 861
Proposed resolution
(Description of the proposed solution, the rationale behind it, and workarounds for people who cannot use the patch.)
Check for taxonomy module:
Lines
// Handle taxonomy.
if ($parts['args'][0] == 'taxonomy' && is_numeric($parts['args'][2])) {
Change to
// Handle taxonomy.
if ($parts['args'][0] == 'taxonomy' && is_numeric($parts['args'][2]) && module_exists('taxonomy')) {
Remaining tasks
(reviews needed, tests to be written or run, documentation to be written, etc.)
- Review by community
- Change commit
User interface changes
(New or changed features/functionality in the user interface, modules added or removed, changes to URL paths, changes to user interface text.)
None
API changes
(API changes/additions that would affect module, install profile, and theme developers, including examples of before/after code if appropriate.)
None
Related Issues
(A list of related issues.)
N/A
Original report by [username]
(Text of the original report, for legacy issues whose initial post was not the issue summary. Use rarely.)
N/A
Comments
Comment #1
ram4nd commentedThe module does exist, maybe it needs to be loaded for it, why does it need the term in the first place.
Comment #2
Georgii commented2 ram4nd,
In my config this module is disabled. So the issue is about all the installations without taxonomy turned on
Comment #3
ram4nd commentedI am telling you that I have the issue with taxonomy module enabled as well!
Comment #4
Anonymous (not verified) commentedCould I see a proper patch for this ? Also what concerns me is the logic behind the use all the other conditions and then
and whether any of the original if argument is needed.
From the api documentation https://api.drupal.org/api/drupal/includes%21module.inc/function/module_... then
But then ram4nd states that he has the fatal error with taxonomy turned on.
Comment #5
MRPRAVIN commentedTaxonomy module is a core module. Anyway this module is available within the core itself in drupal 7. Then why should we check this condition.
function taxonomy_term_load are defined in taxonomy module. I think globally most of the people should not disable the taxonomy module at any cost. Can you please explain in which case you are going to disable taxonomy module. I want to know the exact situation why this module is to be disabled from your case? Can you explain if no problem.
Comment #6
MRPRAVIN commentedI'm going to closed this ticket bcz it's almost outdated. Please reopen if needs to discuss this thread again.
Thanks.
Comment #7
graytoby commentedI have the same issue. There should be a check in place to verify taxonomy module is enabled.
To address the concern in #5, taxonomy module is optional. Just because it's in core, it doesn't mean everyone has to enable it. I disable taxonomy, because I choose to. That's all the explanation one needs to give. So unless Boost requires Taxonomy as a dependency (why????) it should check if it's enabled or not.
Comment #8
MRPRAVIN commentedthen if it is in this case of dependency we can define it in directly in .info otherwise we can check the condition before calling taxonomy_term load whether the taxonomy module is enabled or not by using module_exists with function_exists too.