[drupal-devel] [feature] protect against breaking the bootstrap

moshe weitzman drupal-devel at drupal.org
Sat Apr 2 20:18:25 UTC 2005


Issue status update for http://drupal.org/node/19895

 Project:      Drupal
 Version:      cvs
 Component:    base system
 Category:     feature requests
 Priority:     normal
 Assigned to:  moshe weitzman
 Reported by:  moshe weitzman
 Updated by:   moshe weitzman
 Status:       patch
 Attachment:   http://drupal.org/files/issues/module_list.patch (1.02 KB)

currently modules can inadvertently load all other modules during the
bootstrap. this is easy to do by calling a node_load() or
module_invoke_all(). this degrades performance for anonymous users when
caching is enabled. 
with this patch, the module writer will see an php error like "Call to
undefined function: drupal_set_html_head()" if this is attempted.
basically, unavailable functions are actually reported as unavailable.
this patch is only 1 line long, and probably worthy of 4.6
consideration. If it goes in for 4.7, that would be OK with me too.
in order to test this patch, you could view a cached page as anonymous
when an offending modeule is enabled (e.g. sections.module,
taxonomy_context.module, etc.). I will help fix all these modules after
this patch is accepted.


moshe weitzman




More information about the drupal-devel mailing list