Page MenuHomePhabricator

Special:CategoryTree switches mode by itself
Open, Needs TriagePublicBUG REPORT


Steps to replicate the issue (include links if applicable):

  • Go to Special:CategoryTree
  • Make sure mode is set to "categories only"
  • Click "show tree"

What happens?:
Instead of categories only, it shows all pages and the mode setting has changed to "all pages" by itself.

What should have happened instead?:
Only categories should be there

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):
Firefox 102.9
This does not happen with MW 1.35.

Event Timeline

Change 991038 had a related patch set uploaded (by Fomafix; author: Fomafix):

[mediawiki/extensions/CategoryTree@master] Stay on mode=categories after the first submit with all namespaces

This addresses the bug in the task description.


Screenshot 2024-02-02 at 5.29.06 PM.png (1×2 px, 187 KB)


Screenshot 2024-02-02 at 5.29.40 PM.png (1×2 px, 188 KB)

it doesn't address this case:

  • If I select "categories only" and namespace "Talk"
  • Click show tree

Expected: categories only should remain selected.

@Fomafix I'm not sure I understand the question? If this bug is about making sure the form values persist across submissions we should make sure all the input fields persist correctly, right?

The bug description is about a specific bug which was accidental introduced by change rECTRaec8d75570fd: Replace WebRequest::getVal by ::getRawVal or ::getText. This bug gets fixed by PS1. But you blocked this change.

The code contains some more strange behaviors with replacements of the filters based on specific namespaces. This is probably not a bug (and no regression), this is a feature.

@Fomafix I'm not comfortable with this code enough to see this as a feature. I don't mean to block the change, so I've removed my review. Feel free to find another reviewer who understands this workflow better! Sorry I can't be more help.