Page MenuHomePhabricator

[Regression] [[mw:Extension:Theme]] broken under MW 1.23.0
Closed, ResolvedPublic

Description

[[mw:Extension:Theme]] provides "themes" (prebuilt CSS customizations) by registering an appropriate ResourceLoader module and loading it via OutputPage's addModuleStyles() in a function hooked to the BeforePageDisplay hook.
The extension itself worked wonderfully under MW 1.22.x, but now it's broken under 1.23.0 as the extension-provided CSS modules (i.e. skins.monobook.dark) are loaded right *before* the skin's main CSS module (i.e. skins.monobook.styles for Monobook under 1.23.0), when they're meant to be loaded after the skin's main CSS but before site or user-specific customizations.


Version: master
Severity: major
URL: http://mithnir.shoutwiki.com/wiki/Main_Page

Details

Reference
bz66508

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:20 AM
bzimport set Reference to bz66508.
bzimport added a subscriber: Unknown Object (MLST).

The root cause is the lack of support for dependencies, and the lack of order preservation, in addModuleStyles().

The immediate cause is that the 'skins.monobook' module was renamed to 'skins.monobook.styles', which causes it to sort after 'skins.monobook.dark' rather than before. You can work around this by renaming your modules accordingly.

(In reply to Bartosz Dziewoński from comment #1)

The root cause is the lack of support for dependencies, and the lack of
order preservation, in addModuleStyles().

The immediate cause is that the 'skins.monobook' module was renamed to
'skins.monobook.styles', which causes it to sort after 'skins.monobook.dark'
rather than before. You can work around this by renaming your modules
accordingly.

That is an incredibly stupid workaround, but probably the thing to do for the extension for the time being, pending a proper fix to bug 45229, assuming that's what would fix it? That one is so full of huge blocks of text that in my tired state I'm not even sure.

(Moving this to the Theme component; core bugs this is caused by are marked as dependencies, but this should probably be worked around in Theme for now.)

Fixed (well, more like "worked around") in gerrit change #155291.