Last modified: 2011-03-13 18:04:47 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 12404 - Method to avoid namespace conflicts
Method to avoid namespace conflicts
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
All All
: Lowest enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
  Show dependency treegraph
Reported: 2007-12-24 20:26 UTC by rememberthedot
Modified: 2011-03-13 18:04 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---

Title.php patch (79.54 KB, patch)
2007-12-26 00:56 UTC, rememberthedot

Description rememberthedot 2007-12-24 20:26:13 UTC
As suggested at please treat [[Species: The Awakening]] as being in the main namespace and [[Species:The Awakening]] as

This is a simple change that would greatly cut down on namespace conflicts.
Comment 1 Erwin Dokter 2007-12-24 20:58:17 UTC
To elaborate: this is easily done by testing the presence of a space behind the colon.
Comment 2 Voyagerfan5761 / dgw 2007-12-25 14:11:19 UTC
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...
Comment 3 rememberthedot 2007-12-26 00:56:29 UTC
Created attachment 4470 [details]
Title.php patch
Comment 4 rememberthedot 2007-12-26 00:57:46 UTC
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.
Comment 5 Voyagerfan5761 / dgw 2007-12-26 03:55:51 UTC
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? ;)
Comment 6 Brion Vibber 2007-12-28 00:48:32 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.