Closed (fixed)
Project:
Drupal core
Version:
4.6.5
Component:
base system
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Mar 2006 at 18:19 UTC
Updated:
20 Mar 2006 at 03:56 UTC
I am having a trouble developing a module. In my hook_init() function, I call both the function drupal_get_path, and theme_add_style. Whenever I am logged into the admin user account, everything works fine, but when I am anonymous, it comes up with a fatal error because it can't find either function. In drupal 4.6, I can call require_once("includes/common.inc"), but in 4.7, theme_add_style is not found still.
Is there any way to get around having to include common.inc and other files? Is this expected behavior?
I don't like how when viewing as an administrator, it doesn't throw an error, but for anyone else, it does throw an error. I think it could even be considered a bug.
Comments
Comment #1
bradlis7 commentedI used hook_menu() and !$may_cache. Closing.