Last modified: 2014-07-15 18:05:55 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 T64277, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 62277 - MultimediaViewer should not display hidden categories, or give them lesser priority
MultimediaViewer should not display hidden categories, or give them lesser pr...
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
MultimediaViewer (Other open bugs)
unspecified
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-05 21:41 UTC by Jean-Fred
Modified: 2014-07-15 18:05 UTC (History)
7 users (show)

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


Attachments

Description Jean-Fred 2014-03-05 21:41:51 UTC
On Wikimedia Commons, files are tracked for maintenance or internal purposes using hidden categories.

MultimediaViewer appears to display the first three categories based on the alphabetical order.

This results in displaying non-topical categories which do not make much sense. To give a few examples:

* FPs by creator/place/subject on https://www.mediawiki.org/wiki/Lightbox_demo#mediaviewer/File:Thyssen-Krupp-Quartier-Essen-Q1-2013.jpg

* License category on <https://www.mediawiki.org/wiki/Lightbox_demo#mediaviewer/File:British%20Museum%20Great%20Court,%20London,%20UK%20-%20Diliff.jpg>

* Maintenance category on <https://www.mediawiki.org/wiki/Lightbox_demo#mediaviewer/File:Glenfinnan%20Site.jpg>

The Gallerypreview Gadget (an older, similar attempt to enhance navigation) was working through this through a blacklist [1]. I think ignoring hidden categories is the quickest and safest way.

[1] https://commons.wikimedia.org/wiki/MediaWiki:Gadget-Gallerypreview.js
Comment 1 Arnold Reinhold 2014-05-29 00:54:27 UTC
More to the point, I and other s believe all visible Commons categories should be displayed in the viewer. There have been many comments to this effect at the MultimediaViewer discussion page.
Comment 2 Derk-Jan Hartman 2014-07-15 11:31:13 UTC
This is partly caused by the implementation of getForeignCategories, added in git commit 4893d1f of Bug 56598.


I see it's handy to pass along a TitleArray, but this implementation really quite deviates from getCategories in OutputPage, and looses the 'hidden' flag

https://doc.wikimedia.org/mediawiki-core/master/php/html/OutputPage_8php_source.html#l01240

We should really figure out a better more permanent path forward there... Any ideas ?
Comment 3 Tisza Gergő 2014-07-15 18:05:55 UTC
The return value from getForeignCategories() is analogous to getCategories() except that get it returns Title objects while getCategories() just returns the title strings (I don't remember if there was any real reason for the difference or it just seemed cleaner). The hidden flags are returned by OutputPage::getCategoryLinks().

I guess we could add WikiFilePage::getForeignCategoryData() which returns hidden flags as well.

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


Navigation
Links