Page MenuHomePhabricator

$wgResourceModuleSkinStyles customizations are not being applied for Vector because MobileFrontend accidentally overrides them
Closed, ResolvedPublic

Description

The preferences page on Test Wikipedia has no tabs and doesn't have the logo overlay: https://test.wikipedia.org/wiki/Special:Preferences

The issue is also visible on the beta cluster: https://en.wikipedia.beta.wmflabs.org/wiki/Special:Preferences

Can't reproduce locally. Seems likely there is some JS/CSS module not loading, although I don't get any JS errors in the console.

Other visibly affected stylesheets:

  • oojs-ui dialogs are displaying below the personal bar (T167042)
  • mediawiki.notification popups are ugly
  • jquery.tipsy popups have larger font size than they should
  • jquery.ui buttons are even uglier than usual

Details

Related Gerrit Patches:

Event Timeline

kaldari created this task.Jun 6 2017, 9:10 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 6 2017, 9:10 PM
kaldari triaged this task as High priority.Jun 6 2017, 9:10 PM
kaldari renamed this task from Preferences page lacking tabs on Test Wikipedia to Preferences page messed up on Test Wikipedia.Jun 6 2017, 9:13 PM
kaldari updated the task description. (Show Details)
kaldari added a subscriber: greg.Jun 6 2017, 9:15 PM

CCing @greg in case this is related to today's train deployment to group 0.

Also broken on MediaWiki.org: https://www.mediawiki.org/wiki/Special:Preferences so likely related to the train deployment.

kaldari renamed this task from Preferences page messed up on Test Wikipedia to Preferences page messed up on Test Wikipedia (1.30.0-wmf.4).Jun 6 2017, 9:25 PM
kaldari raised the priority of this task from High to Unbreak Now!.
Restricted Application added subscribers: Jay8g, TerraCodes. · View Herald TranscriptJun 6 2017, 9:27 PM

Group 0 was rolled back to wmf.2. The bug can still be seem on the Beta Cluster: https://simple.wikipedia.beta.wmflabs.org/wiki/Special:Preferences

Bawolff added a subscriber: Bawolff.EditedJun 6 2017, 9:54 PM

That's odd. Looks like the skin specific styles for vector are not loading.

e.g. https://simple.wikipedia.beta.wmflabs.org/w/load.php?debug=true&lang=en&modules=mediawiki.special.preferences.styles&only=styles&skin=vector only loads the generic styles not the vector specific skins/Vector/skinStyles/mediawiki.special.preferences.styles.less. But monobook - https://simple.wikipedia.beta.wmflabs.org/w/load.php?debug=true&lang=en&modules=mediawiki.special.preferences.styles&only=styles&skin=monobook does load skin specific styles. I could not find any recent commits related to that, and was not able to reproduce locally. So i have no idea.

Paladox added a subscriber: Paladox.Jun 6 2017, 9:56 PM

I tried a few of the other modules we customized with $wgResourceModuleSkinStyles in Vector, and it seems that none of the customizations are applied. And indeed, other skins are not affected.

I have no idea what could be causing this. I read through all the related code (ResourceLoader parts where the customizations are applied, and ExtensionProcessor parts where they are loaded), and compared Vector to MonoBook, and I see no reason for this not to work. I've also checked logstash-beta and there's nothing related in there.

The only vaguely related recent patch is my https://gerrit.wikimedia.org/r/357241 to resolve T167042 – I don't see how that could cause this, either, but unless we have any other ideas, we should try reverting that.

I also can't reproduce this locally. I think at this point someone needs to do some debugging in production (or beta). I don't have access to either.

matmarex renamed this task from Preferences page messed up on Test Wikipedia (1.30.0-wmf.4) to $wgResourceModuleSkinStyles customizations are not being applied for Vector (in Wikimedia production/beta only, 1.30.0-wmf.4).Jun 7 2017, 2:34 PM
matmarex updated the task description. (Show Details)
matmarex updated the task description. (Show Details)Jun 7 2017, 2:40 PM

(offtopic)

The preferences page on Test Wikipedia has no tabs and doesn't have the logo overlay: https://test.wikipedia.org/wiki/Special:Preferences

The logo overlay being missing is expected. The overlay is added in site CSS (https://test.wikipedia.org/wiki/MediaWiki:Vector.css), which is intentionally not loaded on Special:Preferences, Special:UserLogin, etc.

matmarex claimed this task.EditedJun 7 2017, 3:17 PM
matmarex added a subscriber: TheDJ.

Inspired by this clever comment by @TheDJ:

[17:05] <thedj> MatmaRex: i've seen something like that before.
[17:05] <thedj> MatmaRex: it happens if someone accidently overrides the array, instead of appending to it

…I decided to grep everything for usages of ResourceModuleSkinStyles. And I found this in MobileFrontend, added in a7a3311bdf313317a7b7bf1597d261e00b570a2d:

	"ResourceModuleSkinStyles": {
		"default": {
			"mobile.special.history.styles": [
				"resources/mobile.special.history.styles/default.less"
			]
		},
		"minerva": {
			"mediawiki.notification": [
				"resources/mobile.startup/toast.less"
			]
		},
		"vector": {
			"mobile.special.mobilemenu.styles": "skinStyles/mobile.special.mobilemenu.styles/vector.less"
		}
	},

It appears that the customization for "vector" overrides the customizations Vector skin itself makes. Possibly this is a bug in ExtensionProcessor?

I'm not sure what this code is supposed to do (both the entries for 'default' and for 'vector' are highly WTF), it should probably be in ResourceModules definitions.

I can confirm that I can reproduce after installing MobileFrontend locally and updating it to master.

Change 357638 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/MobileFrontend@master] Do not use ResourceModuleSkinStyles to define skinStyles for other skins than 'minerva'

https://gerrit.wikimedia.org/r/357638

Also clarified documentation: https://www.mediawiki.org/w/index.php?title=Manual:$wgResourceModuleSkinStyles&diff=2484399&oldid=2178078

@Legoktm Should ExtensionProcessor prevent duplicate definitions for ResourceModuleSkinStyles? (That is, throw exceptions if they happen?)

matmarex renamed this task from $wgResourceModuleSkinStyles customizations are not being applied for Vector (in Wikimedia production/beta only, 1.30.0-wmf.4) to $wgResourceModuleSkinStyles customizations are not being applied for Vector because MobileFrontend accidentally overrides them.Jun 7 2017, 4:21 PM

Change 357638 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Do not use ResourceModuleSkinStyles to define skinStyles for other skins than 'minerva'

https://gerrit.wikimedia.org/r/357638

Change 357643 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/MobileFrontend@wmf/1.30.0-wmf.4] Do not use ResourceModuleSkinStyles to define skinStyles for other skins than 'minerva'

https://gerrit.wikimedia.org/r/357643

Change 357643 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@wmf/1.30.0-wmf.4] Do not use ResourceModuleSkinStyles to define skinStyles for other skins than 'minerva'

https://gerrit.wikimedia.org/r/357643

Mentioned in SAL (#wikimedia-operations) [2017-06-07T20:26:10Z] <twentyafterfour@tin> Synchronized php-1.30.0-wmf.4/extensions/MobileFrontend: Deploy 66ef9cbd7f3de2832154f97392c2418fb1cd56ec refs T167216 (duration: 00m 46s)

mmodell added a subscriber: mmodell.Jun 7 2017, 8:33 PM

Looks like that fixed it.

mmodell closed this task as Resolved.Jun 7 2017, 8:33 PM