Page MenuHomePhabricator

Broken Common.css on Commons breaks search suggestions, Echo, others for Safari, old Firefox
Closed, ResolvedPublic

Description

The interface looks pretty messed up on firefox 3.5 right now on commons. See screenie

I appreciate that this isn't really a supported browser, but I think the interface should look "presentable" on pretty much anything.

Based on timing (It wasn't like this, this morning), I'd guess it might be related to https://gerrit.wikimedia.org/r/#/c/238160/ which was swatted today.

Details

Related Gerrit Patches:
mediawiki/extensions/CentralNotice : masterFallback for browsers that don't support Object.defineProperty
mediawiki/core : wmf/1.26wmf22Revert Echo to 1.26wmf21 version

Event Timeline

Bawolff created this task.Sep 14 2015, 5:49 PM
Bawolff raised the priority of this task from to Needs Triage.
Bawolff updated the task description. (Show Details)
Bawolff added a project: Notifications.
Bawolff added subscribers: Bawolff, Catrope.
Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptSep 14 2015, 5:49 PM
Restricted Application added subscribers: Steinsplitter, Aklapper. · View Herald Transcript

Note, I just noticed it doesn't appear on enwiki or enwikinews. It might be a local script or even a gadget...

Based on timing (It wasn't like this, this morning), I'd guess it might be related to https://gerrit.wikimedia.org/r/#/c/238160/ which was swatted today.

That seems unlikely, because we're still loading those styles (you can check with mw.loader.inspect()), they're just no longer in the top queue.

Also, any tips/pointers on how to install FF 3.5?

even with all my gadgets disabled (including default enabled gadgets), and user:Bawolff/common.js commented out, issue is still present.

Oh, I do have a bunch of errors (not sure why that isn't the first thing I looked at). Also, the top bar looks fine initially. Seems to get messed up after onready. Also, error does not happen when you do ?debug=true.

Exception in module-execute in module ext.centralNotice.display:
TypeError: Object.defineProperty is not a function TypeError: Object.defineProperty is not a function message=Object.defineProperty is not a function

Exception in store-localstorage-update:
[Exception... "Persistent storage maximum size reached" code: "1014" nsresult: "0x805303f6 (NS_ERROR_DOM_QUOTA_REACHED)" location: "https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=T5zOVd1J Line: 175"] [Exception... "Persistent storage maximum size reached" code: "1014" nsresult: "0x805303f6 (NS_ERROR_DOM_QUOTA_REACHED)" location: "https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=T5zOVd1J Line: 175"] code=1014 INDEX_SIZE_ERR=1 DOMSTRING_SIZE_ERR=2

Exception in module-execute in module ext.centralNotice.display:
TypeError: Object.defineProperty is not a function TypeError: Object.defineProperty is not a function message=Object.defineProperty is not a function

https://kangax.github.io/compat-table/es5/#Object.defineProperty I guess they're not loading the es5-shim? Dunno if that would cause other things to stop loading...

Exception in store-localstorage-update:
[Exception... "Persistent storage maximum size reached" code: "1014" nsresult: "0x805303f6 (NS_ERROR_DOM_QUOTA_REACHED)" location: "https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=T5zOVd1J Line: 175"] [Exception... "Persistent storage maximum size reached" code: "1014" nsresult: "0x805303f6 (NS_ERROR_DOM_QUOTA_REACHED)" location: "https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=T5zOVd1J Line: 175"] code=1014 INDEX_SIZE_ERR=1 DOMSTRING_SIZE_ERR=2

T66721: mw.loader.store should not occupy all of localStorage.

Exception in module-execute in module ext.centralNotice.display:
TypeError: Object.defineProperty is not a function TypeError: Object.defineProperty is not a function message=Object.defineProperty is not a function

https://kangax.github.io/compat-table/es5/#Object.defineProperty I guess they're not loading the es5-shim? Dunno if that would cause other things to stop loading...

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

I think the central notice thing is not related to causing this issue, as that error is on all sites, but things are only blowing up for me on commons.

Legoktm renamed this task from Echo looks messed up on commons on some older browsers (firefox 3.5) to Echo looks messed up on commons.Sep 14 2015, 9:52 PM
Legoktm set Security to None.
Legoktm added a subscriber: RP88.
RP88 added a comment.EditedSep 14 2015, 10:07 PM

Note that I and others are seeing rendering issues with the the notification icons on Commons in Safari which does support Object.defineProperty.

Change 238326 had a related patch set uploaded (by AndyRussG):
Fallback for browsers that don't support Object.defineProperty

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

This patch specifically fixes the Object.defineProperty issue in CentralNotice.

Change 238371 had a related patch set uploaded (by Legoktm):
Revert Echo to 1.26wmf21 version

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

Jdforrester-WMF renamed this task from Echo looks messed up on commons to Echo looks messed up on Commons for Safari, old Firefox.Sep 15 2015, 1:39 AM
Jdforrester-WMF assigned this task to Legoktm.

Change 238371 merged by jenkins-bot:
Revert Echo to 1.26wmf21 version

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

Ltrlg added a subscriber: Ltrlg.Sep 15 2015, 8:55 AM
Elitre added a subscriber: Elitre.Sep 15 2015, 9:23 AM
Legoktm removed Legoktm as the assignee of this task.Sep 15 2015, 5:38 PM
Legoktm lowered the priority of this task from Unbreak Now! to High.
Legoktm assigned this task to Catrope.Sep 15 2015, 5:41 PM

We reverted for now, but this is likely still an issue. Roan is looking into it now.

Catrope added a comment.EditedSep 15 2015, 8:00 PM

An issue that I think is related: simplesearch also doesn't display suggestions in Safari. Just like the Echo bug, this only happens in Commons, when logged in, in non-debug mode. The issue goes away if you log out or enable debug mode. Just like with Echo, it happens because the .suggestions { position: absolute; } rule isn't applied, so the list of suggestions is rendered off-screen.

<s>So far all I have to go on is that RL is creating many many more <style> tags in Safari than in Chrome.</s> Never mind, that's not actually true.

This was caused by bad CSS in MediaWiki:Vector.css. Should be fixed with https://commons.wikimedia.org/w/index.php?title=MediaWiki%3AVector.css&type=revision&diff=172090985&oldid=171972596

> document.styleSheets[2].ownerNode.textContent.substr(21600,300)
"px}.mw-special-Userlogin #mw-content-text #signupend{margin-left:50%}#siteSub{display:inline;font-size:92%}@media screen #siteSub{display:none} body.page-Main_Page.action-view #siteSub{display:none !important}body.page-Commons_Mobile_app_Download.action-view #siteSub,body.page-Commons_Mobile_app_Dow"

Note #siteSub { display:inline; font-size:92% } @media screen #siteSub{ display:none }. This is not valid CSS.

In Chrome, this only causes the first rule after @media screen to be ignored (which is still bad!):

> document.styleSheets[2].cssRules[257].cssText
"#siteSub { display: inline; font-size: 92%; }"
> document.styleSheets[2].cssRules[258].cssText
"@media not all { 
}"
> document.styleSheets[2].cssRules[259].cssText
"body.page-Main_Page.action-view #siteSub { display: none !important; }"

Whereas in Safari, the CSS parser stopped completely:

> document.styleSheets[2].cssRules[257].cssText
"#siteSub { display: inline; font-size: 92%; }"
> document.styleSheets[2].cssRules[258].cssText
"@media {
}"
> document.styleSheets[2].cssRules[259].cssText
TypeError: undefined is not an object
Jdforrester-WMF renamed this task from Echo looks messed up on Commons for Safari, old Firefox to Broken Common.css on Commons breaks seach suggestions, Echo, others for Safari, old Firefox.Sep 15 2015, 10:00 PM
Mooeypoo renamed this task from Broken Common.css on Commons breaks seach suggestions, Echo, others for Safari, old Firefox to Broken Common.css on Commons breaks search suggestions, Echo, others for Safari, old Firefox.Sep 15 2015, 10:05 PM

Change 238326 merged by XenoRyet:
Fallback for browsers that don't support Object.defineProperty

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

Legoktm closed this task as Resolved.Sep 16 2015, 11:14 PM

Marking as resolved as Vector.css has been fixed on commons and upstream bugs have been filed with Safari.

matej_suchanek removed a subscriber: gerritbot.