Last modified: 2014-01-09 20:39:14 UTC
In bug 57464 we noticed that any namespace prefix which was also an interwiki prefix mysteriously vanishes when using a cross-wiki job. After digging a bit, I've found why, and believe it's a core issue. I'm going to describe what is wrong in JobQueueRedis, though the same issue is in JobQueueDB too. Didn't check the other implementations. JobQueueRedis::doBatchPush calls JobQueueReids::getNewJobFields which basically serializes the Job object. When converting the title object, it stores the namespace integer and DBkey. When reconstructing in JobQueueRedis::getJobFromFields, it does Title::makeTitleSafe( $fields['namespace'], $fields['title'] ) This means the interwiki prefix and fragment will mysteriously vanish, since neither are included in the DBkey. I recommend that the interwiki prefix and fragment are also extracted in getNewJobFields and used when reconstructing the title object in getJobFromFields. Note that even that would not have fixed bug 57464, there still would have been a namespace/interwiki collision.
I'd suggest not use the main job title and storing the params manually for this extension. The whole forced Title thing is mostly old cruft and some jobs don't even need a title. You can always used a dummy title for the job title field. If anything it should be deprecated altogether.
That makes sense, and I guess this is just a symptom of bug 42862.