Last modified: 2011-09-13 09:03:21 UTC
I'm using "addScript" for a own "BeforeDisplayPage" hook to add some scripts and stylesheets ($out->addScript("<link ....") and $out->addScript("<script ...")); This works fine up to 1.16.5. In 1.17 the "SCRIPT" and also the "LINK" are inserted at the end of HTML and not in the "<HEAD>". For CSS this is a problem (e.g. "flicker" effects for "display none" CSS elements). Problem currently bypassed using "$out->addHeadItem" which works fine. May be you could change this to implicit "addHeadItem" in the future? Problem seems to be only in "BeforeDisplayPage" hook processing, not in PARSER extensions. From my point of view (maybe wrong) it relates to the resource loader processing (which works fine!) Regards W. Rohrschacher
What you should really do is migrate your extension to ResourceLoader properly, see https://secure.wikimedia.org/wikipedia/mediawiki/wiki/ResourceLoader/Migration_guide_for_extension_developers
Closing as WORKSFORME, this is not a bug. You should migrate your extension to ResourceLoader. As of 1.18, you will be able to use 'position' => 'top' in the module definition to specify that your module should be loaded in the <head>.