Page MenuHomePhabricator

JSDuck live preview on doc.wikimedia.org fails with errors from mediawiki.base.js
Closed, ResolvedPublic

Description

Steps to reproduce:

  1. Visit https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/OO.ui.ToggleSwitchWidget
  2. Click on Live Preview below the description.
  3. Observe error in the console displayed below the description

Error message:

Uncaught TypeError: Cannot read property '0' of undefined
https://doc.wikimedia.org/mediawiki-core/master/js/modules/src/mediawiki.base/mediawiki.base.js:652

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 5 2018, 3:45 PM

In the OOUI documentation they work correctly: https://doc.wikimedia.org/oojs-ui/master/js/#!/api/OO.ui.ToggleSwitchWidget

They are only broken in the MediaWiki core documentation (which apparently includes all of OOUI documentation too).

matmarex renamed this task from Live preview of OOUI js widgets on doc.wikimedia.org fails with errors to JSDuck live preview on doc.wikimedia.org fails with errors from mediawiki.base.js.Sep 7 2018, 12:28 AM
matmarex edited projects, added MediaWiki-General, Documentation; removed OOUI.
matmarex added a subscriber: Krinkle.
Schnark added a subscriber: Schnark.Sep 7 2018, 9:12 AM

Code examples from MW core are partially affected, too: https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.Message has the same error, though the examples actually run correctly.

Restricted Application added a project: Performance-Team. · View Herald TranscriptSep 9 2018, 7:02 AM
Krinkle claimed this task.Sep 10 2018, 5:55 PM
Krinkle moved this task from Inbox to Next In This Quarter on the Performance-Team board.

Change 459627 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/core@master] resourceloader: Update startup mock in jsduck/eg-iframe

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

Krinkle triaged this task as Normal priority.Sep 10 2018, 8:28 PM
Krinkle moved this task from Doing to Blocked or Needs-CR on the Performance-Team board.
Krinkle edited projects, added MediaWiki-Documentation; removed MediaWiki-General.

Change 459627 merged by jenkins-bot:
[mediawiki/core@master] resourceloader: Update startup mock in jsduck/eg-iframe

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

Now we get:

GET https://doc.wikimedia.org/mediawiki-core/master/js/modules/src/oojs-ui-local.css net::ERR_ABORTED 404
GET eg-iframe.html:91 GET https://doc.wikimedia.org/mediawiki-core/master/js/modules/lib/oojs-ui/oojs-ui-core-mediawiki.css net::ERR_ABORTED 404
GET eg-iframe.html:92 GET https://doc.wikimedia.org/mediawiki-core/master/js/modules/lib/oojs-ui/oojs-ui-widgets-mediawiki.css net::ERR_ABORTED 404
GET eg-iframe.html:93 GET https://doc.wikimedia.org/mediawiki-core/master/js/modules/lib/oojs-ui/oojs-ui-toolbars-mediawiki.css net::ERR_ABORTED 404
GET eg-iframe.html:94 GET https://doc.wikimedia.org/mediawiki-core/master/js/modules/lib/oojs-ui/oojs-ui-windows-mediawiki.css net::ERR_ABORTED 404

Different issue -> close and fix in another task?

Krinkle closed this task as Resolved.Sep 10 2018, 9:50 PM

Yeah, those have been 404 for a few months at least. Also needs fixing. Thanks!