Index: includes/theme.inc =================================================================== --- includes/theme.inc (revision 10424) +++ includes/theme.inc (working copy) @@ -32,6 +32,12 @@ function init_theme() { global $theme, $user, $custom_theme, $theme_engine, $theme_key; + $backtrace=debug_backtrace(); + if(arg(0)=='admin' && arg(1)=='build' && arg(2)=='block' && $backtrace[sizeof($backtrace)-1]['function']=='drupal_bootstrap'){ + die("Error: Attempt to initialise theme in bootstrap phase. This is usually caused by a call to path_to_theme() within a hook_menu or a module file.\n