I've been recently struggling with getting my cas module to support caching (not agressive caching). I started by getting error messages when I called arg() in my hook_init and am now having problems with base_path() not being defined. Can anyone suggest a strategy for eliminating these errors? Is there a bootstrap function I should be calling in my hook_init? If not should I be filing a core bug related to this, or should I not be able to use arg and base_path in a hook_init function? Thanks for any help Dave
David Metzler wrote:
I've been recently struggling with getting my cas module to support caching (not agressive caching). I started by getting error messages when I called arg() in my hook_init and am now having problems with base_path() not being defined.
Can anyone suggest a strategy for eliminating these errors? Is there a bootstrap function I should be calling in my hook_init?
If not should I be filing a core bug related to this, or should I not be able to use arg and base_path in a hook_init function?
In Drupal 5.x, I avoid hook_init and actually put all of my initialization in hook_menu under the !$may_cache else. For example: function mymodule_menu($may_cache) { $items = array(); if ($may_cache) { // initialize menu array... } else { // stuff that you normally would put in hook_init } return $items; } -- Doug Green douggreen@douggreenconsulting.com 904-583-3342 Bringing Ideas to Life with Software Artistry and Invention...
participants (2)
-
David Metzler -
Doug Green