Page MenuHomePhabricator

Metadata is missing for some images on mw.org
Closed, ResolvedPublic

Description

The MediaViewer metadata panel is empty for some images on mediawiki.org
e.g. https://www.mediawiki.org/wiki/Lightbox_demo#mediaviewer/File:Casmerodius%20albus%20portrait.jpg

The bug is deterministic, only affects a few images, and only on mediawiki.org (the same images work fine on beta enwiki). There are no errors in the console. I don't see any obvious common feature. One of the affected images, https://www.mediawiki.org/wiki/Lightbox_demo#mediaviewer/File:Pentacle 3.svg doesn't even have an {{Information}} template.


Version: unspecified
Severity: normal

Details

Reference
bz62019

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:01 AM
bzimport added a project: MediaViewer.
bzimport set Reference to bz62019.
bzimport added a subscriber: Unknown Object (MLST).
Tgr created this task.Feb 27 2014, 8:27 PM
Tgr added a comment.Feb 27 2014, 8:29 PM

At first glance seems like a promise rejection (we should have better logging of those). I tried to check with the code below whether any provider rejects, and didn't find anything, but maybe I messed up the code:

$.each( mw.mmv.provider, function ( providerName, provider ) {

var oldGet = provider.get;
provider.get = function () {
  oldGet.apply( provider, arguments ).then( null, function () {
    var d = $.Deferred();
    console.log( providerName + ' rejected!', arguments );
    return d.reject.apply( d, arguments );
  } );
};

} );

Tgr added a comment.Feb 28 2014, 2:39 AM

Apparently I did mess up; the error is caused by the user provider rejecting when the user is missing. This does not happen for local and beta sites (local users always exist, and API repos are queried via JSONP so again the user always exist), only for ForeignDBRepo images (although I imagine it could happen when a user gets deleted/renamed with just the right timing).

Change 116044 had a related patch set uploaded by Gergő Tisza:
Create fake user when userinfo request fails

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

Change 116044 merged by jenkins-bot:
Create fake user when userinfo request fails

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

Change 116506 had a related patch set uploaded by MarkTraceur:
Create fake user when userinfo request fails

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

Change 116506 merged by jenkins-bot:
Create fake user when userinfo request fails

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

Gilles triaged this task as Unbreak Now! priority.Dec 4 2014, 10:11 AM
Gilles moved this task from Untriaged to Done on the Multimedia board.
Gilles lowered the priority of this task from Unbreak Now! to Needs Triage.Dec 4 2014, 11:21 AM