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

       Web browser: ---
            Bug ID: 59863
           Summary: Links to the foreign repository pictures use local
                    wiki and not foreign repo file namespace
           Product: MediaWiki extensions
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: Unprioritized
         Component: MultimediaViewer
          Assignee: wikibugs-l@lists.wikimedia.org
          Reporter: dereck...@espace-win.org
                CC: aarcos.w...@gmail.com, fflo...@wikimedia.org,
                    gti...@wikimedia.org, mtrac...@member.fsf.org
    Classification: Unclassified
   Mobile Platform: ---

[ Bug symptoms ]

As highlighted on
https://www.mediawiki.org/wiki/Talk:Multimedia/About_Media_Viewer#On_Wikipedia.2C_links_don.27t_go_to_Commons,
the link to the file on Commons contained twice the file namespace.

For example, [[File:Quux.jpg]] linked to
http://commons.wikimedia.org/wiki/File:File:Quux.jpg

This has been fixed, writing once the namespace. So for en. File:File: became
File: and all is fine.

But in other MediaWiki languages, the link were:
http://commons.wikimedia.org/wiki/File:Fichier:Quux.jpg

And is now:
http://commons.wikimedia.org/wiki/Fichier:Quux.jpg

But it should be:
http://commons.wikimedia.org/wiki/File:Quux.jpg

Thank you to Okki for reporting this.


[ Bug analysis ]

In ext.multimediaViewer.lightboxinterface.js, LIP.setFilePageLink:

For Commons as foreign repo, linkpath = repoInfo.server + repoInfo.articlepath
repoInfo.articlepath is /wiki/$1, $1 being substituted by
fileTitle.getPrefixedText().

Instead, $1 should be replaced by repofileNameSpace + ":" +
fileTitle.getMain().

Where repofileNameSpace is the file namespace on the foreign repo.

-- 
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
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to