Page MenuHomePhabricator

Wikilabels should better handle "revision not found"
Open, LowPublic

Description

I was trying to label some edits for itwiki, so I went to https://labels.wmflabs.org/ui/itwiki/ and requested a workset. However, every edit I try to open returns an API error, which could be either "revision not found" or, more rarely, "missingcontent". Examples:

{
  "code": "missingcontent",
  "info": "Missing content for revision ID 73247173.",
  "*": "See https://it.wikipedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."
}
{
  "code": "revision not found",
  "message": "Impossibile ottenere i metadati per la versione 70189113. Cliccando sul pulsante \"Salta\", salterai questa attività"
}

I tried two whole worksets, and no edit showed up. By opening a couple of random revisions directly on itwiki I saw that they're all hidden revisions, however I do have sysop rights and can see them on-wiki.
The browser console tells nothing more (it only copies the API error), I'm using Chrome and switching to private navigation didn't fix the problem. FWIW, I also have 2FA enabled.
The problem is similar to T194457, although here I'm also seeing the "missingcontent" error.

Event Timeline

Using a sample API request, I noticed that:

On m.o I read:

The API format=json accepts a "callback" parameter [...] Note that any JSONP requests will be processed as if logged out, even if the browser session is authenticated against the remote wiki.

So this would perhaps explain why I keep getting this error for deleted revisions?

It looks like this revision was part of a deleted page and all of the revisions that weren't deleted have already been labeled. I've submitted a placeholder label for that revision so now we can consider this campaign complete. I'll be working from this data to build the damage detection models for Italian Wikipedia.

Generally, I think there are two underlying problems you're running into. One is that deleted revisions seem to affect the labeling campaign in complicated ways and we ought to deal with them better. The other problem is that by making remote calls to the MW api, we need to use JSONP, but JSONP (callback) won't use your credentials to allow you to access deleted content. In this case, it's not a big deal. But if we had a labeling campaign for deleted content (e.g. new page deletion reasons), it would be a big deal. I'll make some new tasks and link them in a reply.

Halfak renamed this task from Wikilabels campaign shows "revision not found" for every revision I try to open to Wikilabels campaign shows "revision not found" and that's confusing and sometimes wrong.Nov 20 2018, 3:31 PM

I've edited the task title to reflect the confusing aspect of this situation. Rather than wave this off and say "that's how it is supposed to work", I think we should take this on as a UX issue.

@Halfak Yeah, I lately got to the same conclusion that this happens both because deleted revisions aren't handled properly, and because for itwiki only deleted revisions are left. I guess showing a clearer message would be great for the moment, while the proper solution would be of course to overcome the limitations of JSONP.

Halfak renamed this task from Wikilabels campaign shows "revision not found" and that's confusing and sometimes wrong to Wikilabels should better handle "revision not found".Feb 26 2019, 10:40 PM
Halfak triaged this task as Low priority.