views:

28

answers:

1

It appears my Drupal pages load twice.

If I added debugging such as drupal_set_message() in methods such as includes/common.inc drupal_build_css_cache() and it gets called twice.

I also have modules that add to the data to the DB these also get called twice and I really only want certain DB updates to be called once.

Is this normal for drupal?

Could it be a devel or optimization thing?

+1  A: 

If you want to see if your page get's loaded more than once, the best place to test that would be in hook_init in a module, or hook_preprocess_page in your theme.

It's hard to say anything concrete with the info you've given, but the same function can be called several times on a single page load. If you want help with a concrete issue, you should post some relevant code.

I've never experience Drupal loading a page more than once or similar.

googletorp
Thanks for this, I'll properly diagnose this issue with hook_preprocess_page
James Bayliss

related questions