Page MenuHomePhabricator

Method to avoid namespace conflicts
Closed, DeclinedPublic

Description

Author: rememberthedot

Description:
As suggested at http://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_%28technical%29&oldid=180002586#Namespace_issues_wrecking_an_article please treat [[Species: The Awakening]] as being in the main namespace and [[Species:The Awakening]] as http://species.wikimedia.org/wiki/The_Awakening

This is a simple change that would greatly cut down on namespace conflicts.


Version: unspecified
Severity: enhancement

Details

Reference
bz12404

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 10:00 PM
bzimport set Reference to bz12404.
bzimport added a subscriber: Unknown Object (MLST).

To elaborate: this is easily done by testing the presence of a space behind the colon.

MediaWiki wrote:

Looks like a good idea to me. I hope to see it implemented.

It might not work for interwikis, but for namespace aliases, if the software could display some sort of note that a page with the same title in a different namespace exists... Or check for existence of the page that "should" be there (the one in the aliased namespace), and if it doesn't, use the one with the matching title.

So for Wikipedia, pages named WP:X automatically alias to Wikipedia:X. If Wikipedia:X doesn't exist, the software should automatically use WP:X instead, to alleviate issues from configuration changes. Just a thought...

rememberthedot wrote:

Title.php patch

Attached:

rememberthedot wrote:

OK, I've made a simple patch to resolve this issue. It's based off 1.11.0, so it may need to be tweaked to work with the current version of MediaWiki. Only the secureAndSplit() function has been changed.

I tested this patch on a local MediaWiki installation and it appears to work perfectly.

MediaWiki wrote:

Nice work, there, Remember The Dot. :) I applied the patch to my installation of 1.11.0 temporarily, and it does exactly what you said. I haven't done any extensive testing (not that I even know what to extensively test for or how to do so), but it looks like it's ready for the devs to look over.

I don't entirely understand why what you changed works; but I shouldn't have to, right? ;)

Too fragile. We already accept links with spaces between the namespace/interwiki and title portion, and changing this would lead to general problems.

Rather, I'd recommend against adding interwikis willy-nilly.