Page MenuHomePhabricator

Properly initialize depicts widget on page without existing depicts items
Closed, ResolvedPublic

Description

Getting this error on beta commons right now, on a page where there is no existing depicts item:

load.php?debug=false&lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=vector&version=0sgfkzu:51 jQuery.Deferred exception: Cannot read property 'indexOf' of undefined TypeError: Cannot read property 'indexOf' of undefined
    at MediaInfoStatementsItemWidget.statements.ItemWidget.buildTitle (<anonymous>:684:450)
    at <anonymous>:684:255
    at mightThrow (https://commons.wikimedia.beta.wmflabs.org/w/load.php?debug=false&lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=vector&version=0sgfkzu:48:856)
    at process (https://commons.wikimedia.beta.wmflabs.org/w/load.php?debug=false&lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=vector&version=0sgfkzu:49:516) undefined

I suspect this is just a case of attempting to setData() with incomplete/missing data, or setData() incorrectly processing such data.

Related Objects

Event Timeline

matthiasmullie triaged this task as High priority.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 12 2019, 4:37 PM
Cparle added a subscriber: Cparle.Feb 12 2019, 4:52 PM

Update:

Current error msg:

jQuery.Deferred exception: Cannot read property 'indexOf' of undefined TypeError: Cannot read property 'indexOf' of undefined
    at MediaInfoStatementsItemWidget.statements.ItemWidget.renderInternal (<anonymous>:685:176)
    at mightThrow (https://commons.wikimedia.beta.wmflabs.org/w/load.php?debug=false&lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=vector&version=0r9qulh:48:856)
    at process (https://commons.wikimedia.beta.wmflabs.org/w/load.php?debug=false&lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=vector&version=0r9qulh:49:516) undefined
matthiasmullie moved this task from To Do to Doing on the SDC Engineering board.Feb 14 2019, 3:46 PM

Change 490584 had a related patch set uploaded (by Cparle; owner: Cparle):
[mediawiki/extensions/WikibaseMediaInfo@master] Delete statements on 'publish' when editing depicts on File page

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

Ramsey-WMF moved this task from Untriaged to Next up on the Multimedia board.Feb 14 2019, 6:20 PM

Change 490584 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Delete statements on 'publish' when editing depicts on File page

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

Cparle closed this task as Resolved.Feb 21 2019, 11:10 AM