Last modified: 2013-08-11 05:37:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T49134, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 47134 - special pages inconsistently load mediawiki.special's JS or CSS
special pages inconsistently load mediawiki.special's JS or CSS
Status: NEW
Product: MediaWiki
Classification: Unclassified
ResourceLoader (Other open bugs)
1.22.0
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-11 19:23 UTC by spage
Modified: 2013-08-11 05:37 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description spage 2013-04-11 19:23:25 UTC
The 'mediawiki.special' module defines 
        'scripts' => 'resources/mediawiki.special/mediawiki.special.js',
        'styles' => 'resources/mediawiki.special/mediawiki.special.css',
but several special pages call only 
        $out->addModuleStyles( 'mediawiki.special' );
ignoring the JS. mediawiki.special.js currently only defines an mediaWiki.special namespace, so this is not causing any harm. Conversely, Special:RecentChanges does not addModuleStyles( 'mediawiki.special' ) and instead mentions it as a dependency of its script module, so it does not load mediawiki.special.css if JS is disabled; RecentPages doesn't seem to use any of the styles in mediawiki.special.css so again no harm.

I noticed this while researching how code handles addModule{s,Scripts,Styles}.  Roan suggested that if code has CSS that should load when JS is disabled then it should be in a separate module to avoid this confusion, I don't see a naming convention for this (a '_nojs' suffix perhaps?).

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links