Page MenuHomePhabricator

Erwin's tools: Broken layout due to shared.css 404 Not Found
Closed, ResolvedPublic

Description

Via Common.css the following css is included:

@import "//bits.wikimedia.org/static-current/skins/common/shared.css";

After advice on irc, tried to pull a copy to use locally from:

https://github.com/wikimedia/mediawiki-core/blob/master/resources/src/mediawiki.legacy/shared.css

But that still gives wrong layout, so probably not the correct version. Will need more searching to find the right one again.


Version: unspecified
Severity: normal

Details

Reference
bz71482

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:51 AM
bzimport set Reference to bz71482.
bzimport added a subscriber: Unknown Object (MLST).

Loading raw css files hasn't been the standard practice since 2010.

Instead of requesting the raw file directly - which is unsupported (MediaWiki can change this at any time with no announcement, this is not a documented interface) - Use ResourceLoader instead, for example:

https://bits.wikimedia.org/www.mediawiki.org/load.php?debug=false&lang=en&modules=mediawiki.legacy.shared&only=styles

This avoids requesting raw files and forces you to make the same decisions the wiki software does (pick a specific wiki, language and module name).

Advantages:

  • More caching.
  • Smaller file size (minification).
  • Officially supported and documented (we'll let you know if it is planned to change, plus migration period).

Regardless of whether the wiki upgrades to a newer version and whether the files are moved around internally (or split up into several files), it will continue to work as expected.

Replaced with load.php calls and updated the HTML to be compatible