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

Jaza’s picture

I'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?

kilrizzy’s picture

Have the same problem, not sure what it could be, had to disable the module.

alex’s picture

My 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

Jaza’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

Bumping 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.

imgfx’s picture

I 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

vaibhavgupta28’s picture

Hi Mike,

Did u found a solution for this problem finally?

ejwensley’s picture

I 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.

JirkaRybka’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

I'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...