Page MenuHomePhabricator

mw:PageProp/redirect to a Category when there's no matching mw:WikiLink/Category should output [[:Category:Foo]] not [[Category:Foo]]
Closed, ResolvedPublic

Description

Pages with a <link rel="mw:PageProp/redirect" href="./Category:Foo"> but without a <link rel="mw:WikiLink/Category" href="./Category:Foo"> should be serialised to [[:Category:Foo]] per the spec, but instead are becoming [[Category:Foo]] which (a) is wrong and (b) doesn't round-trip.


Original VE complaint:

The VE's Page Settings dialog redirect options work badly for category destinations.

For example, if you choose 'Category:Article stubs' as your destination, it inserts this:

#REDIRECT [[Category:Article stubs]]

While this does redirect the page, it also places that page in the "Article stubs" category.

It *should* put this on the page:

#REDIRECT [[:Category:Article stubs]]

Note the additional ":" - this prevents the category being interpreted wrongly.

https://www.mediawiki.org/w/index.php?title=VisualEditor:Redirecttest&action=history


Version: unspecified
Severity: minor
OS: Mac OS X 10.9
Platform: Macintosh

Details

Reference
bz71708

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:48 AM
bzimport set Reference to bz71708.

I wonder if there is any use case for allowing the version without ":" with these namespaces, even if it should clearly not be the default. I don't think we want to add an extra button for something so obscure to most users.

Jdforrester-WMF renamed this task from VisualEditor: redirect option works badly if pointing to category pages to mw:PageProp/redirect to a Category when there's no matching mw:WikiLink/Category should output [[:Category:Foo]] not [[Category:Foo]].Mar 5 2015, 10:25 PM
Jdforrester-WMF updated the task description. (Show Details)
Jdforrester-WMF set Security to None.

Change 197035 had a related patch set uploaded (by Marcoil):
T73708: Serialize category redirects with a ':'

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

What about files?

What's the situation with files? Should they also be serialized with a ':'?

Change 197035 merged by jenkins-bot:
T73708: Serialize category redirects with a ':'

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

What about files?

What's the situation with files? Should they also be serialized with a ':'?

Hmm... After doing some more checking, I think it may be OK without a ':' actually. Ignore me.

This change was deployed on March 19.