Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Just upgraded from HEAD to 6.x-2.0-alpha1, and now when I try to get to any user-contributed page (blog entrty / book page / etc), I get the following error:
Call to undefined function category_node_get_categories() in sites/all/modules/category/category.module on line 824.
Any help with that would be appreciated :)
Michael
Comments
Comment #1
Jaza CreditAttribution: Jaza commentedI'm unable to reproduce this bug. Please provide additional information, such as:
- Do you have caching enabled? If so, of what type(s)?
- Did you install alpha1 fresh, or upgrade to it? Please note that there is currently no upgrade script.
- What is your environment? PHP version? MySQL / Apache version? OS?
Comment #2
kilrizzy CreditAttribution: kilrizzy commentedHave the same problem, not sure what it could be, had to disable the module.
Comment #3
alex CreditAttribution: alex commentedMy chrystal ball says you people had uploaded module with it's containing folder, something like module/category-6.x-2.0/category/category.module . If this i the case, moving it up to module/category/*.* should help
Comment #4
Jaza CreditAttribution: Jaza commentedBumping this down out of critical until someone can provide some clear steps for how to reproduce this bug. I've tested category with regular and aggressive caching enabled (caching has been known to cause problems like this in the past, due to hook_init sometimes not being fired), and still haven't encountered it. Thanks.
Comment #5
imgfx CreditAttribution: imgfx commentedI had the same error.
I had installed the category module in my sites/all/ directory. Deleted and reinstalled into the /modules directory and it seems to work fine.
*********************************
ADDENDUMB
Nope. When I went to log in, the admin side quits with a similar error.
So it seems the category module wants to be on /sites/all/ when in admin mode and /module/ when in normal unlogged browse mode.
I am taking the module out until I find a solution.
Best Regards,
Mike Scearce
webdog
DOW Networks
Comment #6
vaibhavgupta28 CreditAttribution: vaibhavgupta28 commentedHi Mike,
Did u found a solution for this problem finally?
Comment #7
ejwensley CreditAttribution: ejwensley commentedI was also getting this error. It seemed that category.inc was not being loaded. I did some comparison and noted that category.inc was being loaded in the hook_init function, while some other modules loaded their *.inc files in the hook_theme function. Also after doing some research on hook_init, I noted that it sometimes doesn't load things right (http://drupal.org/node/342131). So I moved the line
require_once dirname(drupal_get_filename('module', 'category')) .'/category.inc';
inside the hook_theme function (function category_theme() {).
That did the trick! No more Call to undefined function category_node_get_categories errors.
I hope this helps others.
Comment #8
JirkaRybka CreditAttribution: JirkaRybka commentedI'm going to close this in favor of #338750: Fatal errors - category.inc sometimes not loaded? - both the issues have a similar discussion, but I simply came across the other one first, and closed a few other duplicates in favor of that one already. The category queue is sometimes difficult to digest...