Page MenuHomePhabricator

mw.widgets.CategorySelector doesn't accept category names with namespace-like prefixes
Closed, ResolvedPublic

Description

mw.widgets.CategorySelector doesn't accept category names with namespace-like prefixes. For example, it'd be impossible to choose https://en.wikipedia.org/wiki/Category:Wikipedia:Edit_count in it.

This is because of confusion about what the 'namespace' argument to mw.Title.newFromText means – it's just a default namespace, so if we do mw.Title.newFromText( 'Wikipedia:Edit count', NS_CATEGORY ), it gets overridden to the 'Wikipedia' namespace. Then we strip the namespace (assuming it must be 'Category') and end up with just "Edit count".

Event Timeline

matmarex raised the priority of this task from to Needs Triage.
matmarex updated the task description. (Show Details)
matmarex added a project: MediaWiki-Interface.
matmarex added a subscriber: matmarex.

Change 260614 had a related patch set uploaded (by Bartosz Dziewoński):
mw.widgets.CategorySelector: Don't lose namespace-like prefixes from category names

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

matmarex triaged this task as Medium priority.Dec 22 2015, 7:46 PM
Jdlrobson changed the task status from Open to Stalled.Jan 19 2016, 6:15 PM
Jdlrobson added subscribers: Krinkle, Jdlrobson.

https://gerrit.wikimedia.org/r/#/c/260613/2 seems to be waiting on feedback from @Krinkle - stalled until Bartosz has that.

matmarex changed the task status from Stalled to Open.Jan 20 2016, 2:41 PM

I've unbroken that change, should be good to go. It's not blocked on Krinkle's response.

Change 260614 merged by jenkins-bot:
mw.widgets.CategorySelector: Don't lose namespace-like prefixes from category names

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