The suggested way of adding custom CSS and scripts for a MediaWiki extension is
via $wgOut->addLink and $wgOut->addScript. However, even if extensions call
these functions during parsing (so that everything appears in the header as
expected), these modifications are (of course) not stored within the database.
Hence, when the article is viewed at a later stage, the headers are missing
again whenever the parsing hooks are not triggered.
The problem is that there is no hook "InitializeOutputPage" (or whatwever) where
extensions can add standard scripts and CSS. This hook would also be useful as a
clean way for performing all kinds of wgOut-customizations that apply to all
pages. It should be easy to fix the issue by providing such a hook.
The required code would probably be:
wfRunHooks('InitializeOutputPage');
to be added in Setup.php after '$wgOut = new OutputPage();' No parameters should
be needed for he hook, since all relevant variables at this stage are global anyway.
Version: 1.7.x
Severity: normal