Page MenuHomePhabricator

Structured Data interface does not work on IE11
Closed, ResolvedPublic

Description

@Nikki reports that the Structured Data on Commons user interface does not work on Internet Explorer 11 – clicking on the “structured data” tab does nothing. In the console, an error appears:

SCRIPT5007: Object.getPrototypeOf: 'this' ist kein Objekt [translation: 'this' is not an object]

I assume this is because, according to MDN,

In ES5, it will throw a TypeError exception if the obj parameter isn't an object. In ES2015, the parameter will be coerced to an Object.

And WikibaseMediaInfo contains code like this:

Object.getPrototypeOf( d[ key ] || '' ) === Object.prototype

which directly relies on Object.getPrototypeOf( '' ) being valid, even though apparently in ES5 it’s not.

Event Timeline

Restricted Application added a project: Wikidata. · View Herald TranscriptApr 6 2020, 9:27 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 587258 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/WikibaseMediaInfo@master] Fix IE11 incompatibility

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

Change 587258 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Fix IE11 incompatibility

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

Ramsey-WMF added a subscriber: Ramsey-WMF.

should be testable on Beta but you'll need IE11

Ramsey-WMF added a subscriber: matthiasmullie.
Nikki added a comment.Apr 9 2020, 3:09 PM

I tested it and it's now possible to click the tab, but it still doesn't work properly. The text is a mess (the things which should be right-aligned are on top of the things on the left) and there are errors when trying to edit anything (nothing happens after selecting an item and the "add statement" button doesn't work). Should those be new tickets or should I just add the errors/screenshot here?

Nikki added a comment.Apr 17 2020, 7:00 PM

I'll put them both here for now.

Here's a screenshot of how sections on the structured data tab render:

The error I get when clicking "Add statement" or selecting an item is:

jQuery.Deferred exception: Das Objekt unterstützt die Eigenschaft oder Methode "after" nicht TypeError: Das Objekt unterstützt die Eigenschaft oder Methode "after" nicht
   at Anonymous function (Unknown script code:56:650)
   at ComponentWidget.prototype.rebuildDOM (Unknown script code:56:438)
   at Anonymous function (Unknown script code:57:236)
   at ComponentWidget.prototype.rebuildDOM (Unknown script code:56:438)
   at Anonymous function (Unknown script code:55:963)
   at mightThrow (https://commons.wikimedia.beta.wmflabs.org/w/load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%7Cjquery.ui%7Cwikibase.mediainfo.statements%7Cwikibase.tainted-ref%7Cwikibase.view.ControllerViewFactory&skin=vector&version=zr15n:49:132)
   at Anonymous function (https://commons.wikimedia.beta.wmflabs.org/w/load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%7Cjquery.ui%7Cwikibase.mediainfo.statements%7Cwikibase.tainted-ref%7Cwikibase.view.ControllerViewFactory&skin=vector&version=zr15n:49:808) undefi
[object Error]{description: "Das Objekt ...", message: "Das Objekt ...", name: "TypeError", number: -2146827850, stack: "TypeError: ..."}
Ramsey-WMF moved this task from Needs QA to Doing on the Structured-Data-Backlog (Current Work) board.
Ramsey-WMF added a subscriber: Etonkovidova.

thanks for the additional test. I'll go ahead and but this back on the radar for the developer.

Change 598747 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/WikibaseMediaInfo@master] Use jQuery element instead of node

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

Change 598747 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Use jQuery element instead of node

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

Change 604298 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/WikibaseMediaInfo@master] Use auto flex-basis instead of 0, fixing flexbox issues in IE

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

It looks like all JS errors in IE have now been resolved.
There's still display issues, but I've just submitted a patch that should also resolve those.

Change 604298 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Use auto flex-basis instead of 0, fixing flexbox issues in IE

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

matthiasmullie closed this task as Resolved.Mon, Jun 22, 9:24 AM

Things work & look fine now on my IE machine!