Following code is not loaded when it is under hook_menu() function:
if (module_exists('views')) {
include_once('./'. drupal_get_path('module', 'nat') .'/includes/nat_views.inc');
}
Result is that Views support is not working.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | nat_include_views.patch | 865 bytes | anantagati |
Comments
Comment #1
anantagati commentedCode for including file moved outside of hook_menu function.
Comment #2
anantagati commentedCommitted.
Comment #3
Zen commentedIIRC, while I tested that the file was being included, it might not have been included early enough for views. Could you please stick that block of code in a hook_init instead and see what happens? Please avoid sticking any code besides global defines in the global namespace.
Thanks Petr,
-K
Comment #4
anantagati commentedI moved code to hook_init. It works now good. Thanks.
Commited.
Comment #5
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.