Last modified: 2009-07-26 16:54:24 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 T21943, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 19943 - $wgOut->addExtensionStyle() seems broken
$wgOut->addExtensionStyle() seems broken
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.16.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-26 16:24 UTC by Happy-melon
Modified: 2009-07-26 16:54 UTC (History)
1 user (show)

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


Attachments
Document OutputPage::addExtensionStyle() (888 bytes, patch)
2009-07-26 16:54 UTC, Happy-melon
Details

Description Happy-melon 2009-07-26 16:24:50 UTC
Extension stylesheets are found in the path_to_mw/extensions/ExtensionName/ directory, not path_to_mw/skins/ like core stylesheets.  Hence the provision of two separate worker functions in wgOut, addStyle() and addExtensionStyle().  However, they appear to then go through the same mangle and the extension styles still end up with both the path_to_mw/skins/ directory prefix, and the $wgStyleVersion suffix, that are added to core styles.  Something's not right there.
Comment 1 Chad H. 2009-07-26 16:43:08 UTC
Seems ok to me. As long as extensions are passing their path as either a full URL (with protocol) or relative from the docroot (ie /extensions/MyExt/whatever.css) they should be fine (see line 1941 on HEAD, r53780). Only if the style relative from the current location (ie: MyExt/whatever.css) will it fail, because then styleLink() goes ahead and adds all the stuff you mention, including $wgStylePath.

Checked all extensions in MW SVN that call this, and they all seem to be ok, if they aren't those are individual bugs.

WORKSFORME, no real issue with addExtensionStyle() here.
Comment 2 Happy-melon 2009-07-26 16:54:24 UTC
Created attachment 6391 [details]
Document OutputPage::addExtensionStyle()

Ah, I see.  Needs documenting, then; here's a suggestion.

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


Navigation
Links