Page MenuHomePhabricator

File usage links should display namespace prefix
Closed, ResolvedPublic

Description

Multimedia Viewer currently does not display namespace prefixes. For example, if I use File:Foo on page "User talk:Keegan", it should show an appropriate link to that namespace. Instead MMV displays the file usage link as "Keegan," making it appear as though it is in the main page space. This is undesired behavior.


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=64910

Details

Reference
bz63908

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:22 AM
bzimport set Reference to bz63908.
bzimport added a subscriber: Unknown Object (MLST).

I think the problem is in \MultimediaViewer\resources\mmv\ui\mmv.ui.fileUsage.js in line 138, item.page.getMainText() but I don't know how to fix. Also, the problem is for both local and global file links.

We probably want to use getPrefixedText() instead.

(In reply to TeleComNasSprVen from comment #1)

Also, the problem is for both local and global file links.

I don't think that's currently the case, at least for at my examples.
For example at https://fr.wikipedia.org/wiki/Portail:Animaux_de_compagnie#mediaviewer/Fichier:Golden_retriever_welpe_meer.jpg
see "On other sites": "Benutzer:Vorderstrasse" (prefixed with user namespace)

see Bug 64910 with a namespace prefix too much in the linked url though.
So was the api call changed there so the namespace is now also returned as part of title?

Change 138999 had a related patch set uploaded by Gergő Tisza:
Fix URL handling for global usage list

https://gerrit.wikimedia.org/r/138999

Change 138999 merged by jenkins-bot:
Fix URL handling for global usage list

https://gerrit.wikimedia.org/r/138999