[development] Fatal error : install profiles and the use of hook_install
yched.drupal at free.fr
Fri Nov 30 11:58:25 UTC 2007
This bug is corrected (as a side effect) by the patch in
(install modules in a batch in install.php)
Augustin (Beginner) wrote:
> There seem to be a critical bugs hiding behind the way the install
> profiles are implemented.
> At the very least, there seem to be a gross inconsistency in the
> I could have fixed the api documentation myself, except that I am not
> sure what is the 'normal' behavior.
> When creating an install profile, one runs against such errors:
> "Fatal error: Call to undefined function xxx()"
> This happens when one includes a few specific modules in
> hook_profile_modules(), including book.module:
> The api says that all functions are loaded when running
> "Note that since this function is called from a full bootstrap, all
> functions (including those in modules enabled by the current page
> request) are available when this hook is called. Use cases could be
> displaying a user message, or calling a module function necessary for
> initial setup, etc."
> But the profile documentation implies the contrary:
> the modules (including core required modules and their functions) are
> NOT yet included when running hook_profile_modules() (which calls
> hook_install()). The modules are included only at a later stage,
> A similar problem occurred with forum.module, until a certain function
> call was moved to hook_enable():
> This begs the question: what is it ok to include in hook_install()?
> Is hook_install() only for the DB schema, or can heavier lifting be
> done using any function call?
> If this cannot be fixed for D6, some warning should be included in the
> documentation, especially here: http://drupal.org/node/67921 .
> I didn't do so myself because I am uncertain about all the above.
More information about the development