[development] find the absolute order of hooks and modules?

Darrel O'Pry dopry at thing.net
Fri Feb 24 18:45:15 UTC 2006


On Thu, 2006-02-23 at 09:34 +0100, Nathan Digriz wrote:
> I am curious about this. If the order can be changed by the admin but
> by a module then it is from a default order right? 
> 
> I have seen in previous versions where sometimes people have problems
> because of the order that modules get loaded and so the hooks are not
> available down the line. So is there a safety valve in 4.7 to keep
> this from happening? If I go with 4.7 I don't want to create a monster
> that will lock up peoples installs or wipe anything clean.

No the hooks will be available... Modules are all loaded first. The
module ordering only affects the order they are called in during a
module_invoke_all. The order in which the module hooks take effect is
what changes. There are some use cases where finer grained control, like
ordering per hook could be helpful, might be necessary, but the
primitive ordering in place now has done the job so far.


> On 2/22/06, Moshe Weitzman <weitzman at tejasa.com> wrote:
>         
>         > Is this configurable on any admin screens or only in the
>         DB? 
>         >
>         > I'm assuming if one develops a specific module that should
>         run last it
>         > can have in it's hook_install() a query that sets it weight
>         to 10 or
>         > something, right?
>         >
>         > ted
>         
>         i would expect some contrib module to arise which gives this a
>         UI. we 
>         decided that core need not bother admins with this ... yes, a
>         module is
>         free to reorder the list.
> 



More information about the development mailing list