https://bugzilla.wikimedia.org/show_bug.cgi?id=58524

       Web browser: ---
            Bug ID: 58524
           Summary: When inserting jobs, JobQueue loses interwiki prefix
                    and fragment of titles
           Product: MediaWiki
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: JobQueue
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]
    Classification: Unclassified
   Mobile Platform: ---

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to