Page MenuHomePhabricator

RunJobs.php appearing as a sortkey in categories
Closed, ResolvedPublic

Description

Author: richardjenkins28

Description:
RunJobs.php has somehow been listed as a sortkey for various pages in http://en.wikipedia.org/w/index.php?title=Category:Wikipedia_pages_with_broken_references. This is causing problems when bot scripts (specifically pywikipedia's noreferences.py) try to parse the pages in the category; they hang upon encountering the abnormal key.

See http://p.defau.lt/?xNmrof_5SWi_B8cAP4MNmA (a pastebin of a MySQL query showing the error, do a search for 'RunJobs' to find the relevant rows).


Version: unspecified
Severity: minor
URL: http://en.wikipedia.org/w/index.php?title=Category:Wikipedia_pages_with_broken_references

Details

Reference
bz17442

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:25 PM
bzimport set Reference to bz17442.
bzimport added a subscriber: Unknown Object (MLST).

Fixed in r47127 and patched in to Wikimedia. wfMsg() should never be used to fetch a message destined for wikitext, because this leads to double-parsing. Use wfMsgNoTrans() instead.

The problem in this case is that the cite error contained a category tag with a sortkey of {{PAGENAME}}. When expanded by wfMsg(), this gives you the name of $wgTitle, which is incorrect in runJobs.php. The fix is to use wfMsgNoTrans(), leaving the {{PAGENAME}} tag intact, which is then expanded to the correct title when parsed by recursiveTagParse().