Hi,

In many cases hook_init() will not be required in order to run just a JS callback, and in our case hook_init() completely breaks because it calls functions from the menu module. Instead of putting logic into the hook_init() impementation to detect that it's running under js.php, I thought it might be neater to simply specify that hook_init() isn't required in hook_js().

Here's the patch to allow this flag.

Default is still to run it.

Thanks

CommentFileSizeAuthor
js.php_.skiphookinit.patch610 bytesneilnz

Comments

doitDave’s picture

Subscribed

michielnugter’s picture

Status: Needs review » Fixed

The issue is included in the 6.x release, not yet in the 7.x branch, the method of bootstrapping has changed significantly and I cannot guarantee that the patch will work without problems there.

michielnugter’s picture

Status: Fixed » Closed (fixed)