is _drupal_bootstrap still needed in hook_init or is this a reminiscence from drupal 5?

its causing me issues with subpath_alias where the module isnt working properly and subaliases arent shown, this is because _drupal_bootstrap is called twice on a page load, the last time its called from this module, and it doesnt pass the proper parameters
this page http://api.drupal.org/api/function/hook_init/6 says "when this hook is called, all modules are already loaded in memory.", so path should be available on D6
i understand from this issue http://drupal.org/node/51921 that its because of cached pages
ive tried with caching enabled on a node page, its still called twice, and commenting the line in path_access didnt have any side effects (php errors)

can anyone test this and report?

subpath_alias might be just one module affected by this, i think its a problem with custom_url_rewrite_inbound/outbound and modules implementing them

Comments

dave reid’s picture

Priority: Normal » Major

hook_init() runs after a full bootstrap has been run already, so running _drupal_boostrap() again is a *BIG* no-no.

xurizaemon’s picture

StatusFileSize
new356 bytes

D7 port seems to work fine without drupal_bootstrap() in hook_init().

xurizaemon’s picture

Title: _drupal_bootstrap in hook_init » Remove _drupal_bootstrap() from hook_init
Assigned: Unassigned » xurizaemon
rhoyerboat’s picture

D6 seems to work with _drupal_bootstrap commented out.

xurizaemon’s picture

Assigned: xurizaemon » Unassigned
Status: Needs review » Reviewed & tested by the community

RTBC then!

mrfelton’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.