Looks like this was introduced when fixing #182675: Normal page caching disables hook_boot() and hook_exit().

#17 in that issue also points out that the loading of module.inc was moved. Since it's not needed for a page served from the cache when in aggressive mode, this patch also fixes that (=> should give minor performance improvment. Note that 5.x similarly has module.inc included just before http://api.drupal.org/api/function/bootstrap_invoke_all/5 in http://api.drupal.org/api/function/_drupal_cache_init/5).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gpk’s picture

Status: Active » Needs review

Oh yes there's a patch here ;)

Anonymous’s picture

Status: Needs review » Needs work

The last submitted patch failed testing.

gpk’s picture

FileSize
1018 bytes

I assume the test system doesn't like the CRs I seem to get running diff on Win?
Trying again..

Bug also present in 6.x BTW.

gpk’s picture

Status: Needs work » Needs review
Dave Reid’s picture

I can confirm this behavior. If cache is set aggressive and a user is logged in, hook_boot() will not fire but hook_exit() will. Note, this patch also skips loading the './includes/module.inc' if the page has been cached.

Patches attached for D6 and D7 revised from #3 to not change the comment about loading the page cache.

gpk’s picture

@5: Thanks for reinstating the comment before the module.inc line, omitted in error. Very minor point but not sure why you've reverted the comment about loading the page cache?

Anonymous’s picture

Status: Needs review » Needs work

The last submitted patch failed testing.

Dave Reid’s picture

Status: Needs work » Needs review

Sigh...that's the not last submitted patch.

Anonymous’s picture

Status: Needs review » Needs work

The last submitted patch failed testing.

Dave Reid’s picture

Status: Needs work » Needs review

Comon testing bot...let's not fight. If anyone from testing.d.org reads, please see why the patch from #5 is not considered 'the last test' and is not being tested?

Anonymous’s picture

Status: Needs review » Needs work

The last submitted patch failed testing.

catch’s picture

FileSize
1.09 KB

-d6.patch shouldn't get tested. -d7.patch probably should, but I wonder if it's getting caught by the same regexp. Easy way to find out.

catch’s picture

Status: Needs work » Needs review
gpk’s picture

#12 now showing in the queue http://testing.drupal.org/pifr/node/1/323474. So maybe it did get caught by the regex.

hunmonk’s picture

d.o experienced some database issues earlier today, and i'm guessing 323474-hook-boot-d7.patch in #5 got lost in the fray.

i've re-tested our regex, and it does allow -d7.patch extensions to be submitted for testing, so chalk this one up to a freak accident.

Status: Needs review » Needs work

The last submitted patch failed testing.

Dave Reid’s picture

Status: Needs work » Needs review

Failed due to #74645: modify file_scan_directory to include a regex for the nomask.. Setting back to code needs review.

Dave Reid’s picture

Reposting patches (D7 had a small offset) so I can get a green light from testing.d.org and hopefully get this committed soon. It's an easy fix.

catch’s picture

Could we write a simpletest for this - enable aggressive caching, make sure cache is clear, module which implements hook_boot, watch everything blow up?

Dave Reid’s picture

Status: Needs review » Needs work

Sure thing...let me get one written quick. Will repost patch with test.

Dave Reid’s picture

Status: Needs work » Needs review
FileSize
5.4 KB

There we are! Simple little test included that passes 100% (and would have 1 failure without the patch). Note that the D6 patch is still valid in #18.

catch’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
6.57 KB

Patch looks good, tests pass. Re-rolled only with extraneous phpdoc removed + a line added for the new class. No credit on commit please.

Dries’s picture

Version: 7.x-dev » 6.x-dev

I've committed this to CVS HEAD. I assume that the DRUPAL-6 patch should also go in still?

gpk’s picture

Version: 6.x-dev » 7.x-dev

@23: Yes, #18 still good for D6.

Attached followup patch corrects a garbled comment in the tests, plus a couple of other doc tweaks in the tests.. temporarily resetting version..

(@21: Cool, I was wondering how this could be tested.)

[update: patch removed]

gpk’s picture

Proper patch this time..

webchick’s picture

Version: 7.x-dev » 6.x-dev

Doc cleanup committed to D7.

Moving back to D6 for consideration of #18.

Dave Reid’s picture

Patch in #18 still applies to latest 6.x and is ready to be committed.

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Committed to Drupal 6.x as well.

Status: Fixed » Closed (fixed)

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