Page MenuHomePhabricator

Cannot read property 'badrevids' of undefined
Closed, ResolvedPublic

Description

After requesting a workset in the labeling gadget on huwiki I get Could not parse MediaWiki API's response: TypeError: Cannot read property 'badrevids' of undefined.

Event Timeline

There is a bunch of identical AJAX requests in the background with action:query, prop:revisions, rvprop:ids|parsedcomment but no page name or ID.

The problem is caused by the label service returning messed-up responses:
https://labels.wmflabs.org/campaigns/huwiki/33/3268/?tasks=&campaign= should return a JSON object with r['tasks'][n]['data']['rev_id'] set but it's instead r['tasks'][n]['data']['rev_id\tneeds_review\treason'].

From the code of wiki-labels, I'm guessing the database has been corrupted by a load_tasks run with malformed data.