Page MenuHomePhabricator

Category page showing items outside main namespace.
Closed, DuplicatePublic


Steps to Reproduce:

  1. Add a category "Happy" to the user page. ( for me it is User:FeliaBeHappy)
  2. Go to the category page for "Happy". ( Category:Happy)

Actual Results:

  1. Notice that User:FeliaBeHappy is listed there.
  2. Actually all pages matching the category are listed, regardless of the namespaces they are in.

Expected Results:

  1. Only pages from Main namespace are listed on the category page.
  2. Ideally There would be filters to decide what namespaces to include and what to exclude.

We have 1-line fix in current deployment now which adds 1 extra WHERE condition to the database query : namespace => NS_MAIN, but we would like to use hook instead of modifying core code. We are using some custom namespaces to implement new feature so those pages are purely internal and should not be available to the end users. I imagine the scenario is not uncommon and we would like hear what Mediawiki team would suggest.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 22 2018, 10:22 PM
Reedy updated the task description. (Show Details)
Reedy added a subscriber: Reedy.

Why would you expect a category only showed NS_MAIN pages?

FeliaBeHappy added a comment.EditedFeb 23 2018, 1:33 AM

One example is that
if the user uses the user page as a sandbox, the user page should not show up in the category page.
In my impression some namespaces are either internal or private.
Ideally I would like namespace on/off to configurable.

GeoffreyT2000 triaged this task as Lowest priority.Feb 24 2018, 3:10 AM
GeoffreyT2000 added a subscriber: GeoffreyT2000.

Categories are intentionally set up to show pages in all namespaces. Adding a drop-down box containing namespaces to filter by requires starting an RfC for consensus.

DannyS712 added a subscriber: DannyS712.

This is just a specific case of namespace filtering being desired, so merging to more general task