Last modified: 2014-01-09 20:39:14 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T60524, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 58524 - When inserting jobs, JobQueue loses interwiki prefix and fragment of titles
When inserting jobs, JobQueue loses interwiki prefix and fragment of titles
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
JobQueue (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-16 06:09 UTC by Kunal Mehta (Legoktm)
Modified: 2014-01-09 20:39 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Kunal Mehta (Legoktm) 2013-12-16 06:09:41 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.
Comment 1 Aaron Schulz 2013-12-16 06:25:45 UTC
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.
Comment 2 Kunal Mehta (Legoktm) 2014-01-09 20:39:14 UTC
That makes sense, and I guess this is just a symptom of bug 42862.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links