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

moshe weitzman drupal-devel at drupal.org
Sat Apr 2 21:21:48 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

Just in case someone thinks this isn't a significant problem, have a
look at this scan of the Contrib repos. Some of these modules are not
breaking the bootstrap, but sure many are.
grep -rnl "_init(" *
amazonsearch/amazon_search.module
amazontools/amazon.inc
amazontools/amazon.php4.inc
amazontools/amazon.php5.inc
attached_node/attached_node.module
authorise/patches/tree.patch
blogtheme/blog_theme.module
contextlinks/CHANGELOG.txt
devel/devel.module
ecommerce/contrib/authorize_net/authorize_net.module
filestore2/filestore2.module
gallery/gallery.module
groups/groups.module
htmlarea/plugins/UploadDocuments/popups/insert_link.php
htmlarea/plugins/UploadImage/popups/insert_image.php
htmltidy/htmltidy.module
i18n/i18n.inc
i18n/i18n.module
i18n/patches/i18n_drupal_goto.patch
i18n/patches/i18n_language_variables.patch
jsdomenu/jsdomenu.module
ldap_integration/ldap_integration.module
massmailer/engines/phplist/config.php
media/media.module
node_aggregator/feed.module
nodewords/nodewords.module
over_text/over_text.module
paypal_framework/paypal_framework.module
quicktags/quicktags.module
recorder/recorder.module
ride/ride.module
sections/README.txt
sections/sections.module
shoutbox/shoutbox.module
taxonomy_assoc/taxonomy_assoc.module
taxonomy_context/taxonomy_context.module
theme_editor/theme_editor_engine.engine
troll/troll.module
weblink/weblink.module
webserver_auth/webserver_auth.module


moshe weitzman



Previous comments:
------------------------------------------------------------------------

April 2, 2005 - 14:39 : moshe weitzman

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.





More information about the drupal-devel mailing list