module_load_include() is unreliable
catch - November 6, 2009 - 07:50
| Project: | Content Construction Kit (CCK) |
| Version: | 6.x-2.x-dev |
| Component: | content.module |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Jump to:
Description
I ran into an issue where module_load_include() was failing in content.module - see also discussion on #599122: Convert all require(DRUPAL_ROOT . 'file') to module_load_include(). Patch converts that to just require_once 'the_file.inc'; since we know where they are anyway.
| Attachment | Size |
|---|---|
| require.patch | 918 bytes |

#1
hmm... actually, I think require_once 'includes/content.token.inc'; will fail (unless CCK installation directory is in the include path) because Drupal runs from Drupal root, and that file does not exist there.
That issue is related to D7. Any pointer on when module_load_include() is not reliable when used from hook_init() in D6?