The change in T167077 to $wgContentNamespaces broke special:ShortPages in the eyes of a Commons user. That report is now incorrectly flooded by file pages. Please fix the ShortPages report in a way that it does no longer include file pages. (The discussion in the Village pump did not ask to change the ShortPages report)
Options
- We can revert the change of T167077 however this will break Special;Nearby on mobile and Special:Random on mobile will no longer show file pages.
- If we take this option we'll also have to run updateArticleCount.php per T169822
- Explore ShortPages implementation and see if there is a way to configure it to not include file namespace. This would be preferable as it has the least impact on the rest of the mobile product.
Proposed solutions
a) hardcode skipping NS_FILE inside SpecialShortPages which is probably bad, but most of pages inside NS_FILE are short
b) introduce new config var that defines a list of namespaces to include on SpecialShortPages page
c) introduce new config var that defines a list of namespaces to exclude on SpecialShortPages page
d) use ShortPagesQuery hook and remove NS_FILE only on commons wiki (it may read a config variable what to not include in the report)
e) ~do nothing as NS_FILE is a content namespace in commons wiki.~ JR: not an option.
f) Update Special:ShortPages to allow filtering different namespaces. e.g. Special:ShortPages/0, Special:ShortPages/3 (where number is the namespace)
History
Proposal
We'll do (c) since it's cheap and solves the immediate problem.
(f) would be the most useful but would need some design on how to make these accessible.
It would be nice to do the backend work for (f) so power users can use it if they know the URL, but let's talk about what that means.
Acceptance criteria
- Add unit test for getQueryInfo() - make sure you reset and store hook handlers to make it a true unit test
- There is a variable wgShortPagesNamespaceBlacklist which defaults to []
- On Commons this is set to [ NS_FILE ];
- Visiting https://commons.wikimedia.org/wiki/Special:ShortPages doesn't show file pages
Next steps
Given we've had lots of issues with this already we should not rush to a decision until we've fully understood if there are any other problems.
We've opened T172215 to capture other changes to make this feature more useful.
Sign off steps
- SWAT https://gerrit.wikimedia.org/r/369503 Exclude files from Special:ShortPages on commons when config variable is available in Commons.