Page MenuHomePhabricator

Namespace should be optional in DISPLAYTITLE
Open, LowPublicFeature

Description

It's a common user error to omit the namespace when {{DISPLAYTITLE:}} is used outside mainspace on wikis with the default $wgRestrictDisplayTitle = true. Users rarely want to change the namespace appearance and it's an understandable mistake. I suggest it becomes allowed to omit the namespace. The namespace and colon should be displayed normally in that case.

For example, if you are on https://en.wikipedia.org/wiki/Category:Star_Wars then {{DISPLAYTITLE:''Star Wars''}} should be treated like {{DISPLAYTITLE:Category:''Star Wars''}} instead of giving an error.

Event Timeline

JJMC89 changed the subtype of this task from "Task" to "Feature Request".

@PrimeHunter: Thanks for reporting this. For future reference, please use the feature request form (linked from the top of the task creation page) to create feature requests, and fill in the sections in the template.

If this is done as requested, it would mean that you wouldn't be able to hide the namespace -- it would always be present.

Some wikis want to hide the namespace name, and are not paranoid about having $wgRestrictDisplayTitle=false; to allow this. Note that including the namespace is really very ugly, distracting, and often unnecessary.

It's also not a major problem, if you want to retain the namespace, to add the namespace into the {{DISPLAYTITLE}} coding.

Strongly suggest closing this one as a bad idea WONTFIX. 🔥

The suggestion is for wikis with $wgRestrictDisplayTitle = true, where DISPLAYTITLE fails if the namespace is omitted.
I have made many fixes like https://commons.wikimedia.org/w/index.php?title=Category:Trentbarton_(bus_company)&diff=prev&oldid=197054150.
It's easy if you know the problem but many users don't.
If a wiki has $wgRestrictDisplayTitle = false then DISPLAYTITLE should continue to display whatever is requested.