[Mediawiki-l] case insensitive links

Rowan Collins rowan.collins at gmail.com
Fri Feb 4 17:38:24 UTC 2005

On Fri, 4 Feb 2005 11:54:23 -0500, Muzaffer Ozakca <mozakca at indiana.edu> wrote:
> Just a quick comment here, even if "microsoft windows xp" is incorrect it
> still works. It will create a link to an empty page. Then somebody has to
> notice it and correct it. By the time, somebody else could have typed some
> text and there are two versions of the same thing.

That's a good point - although at least an experienced user would know
that the page might exist at another capitalisation. In fact, the
simplest solution to this would be to add some logic to the
non-existent page display: in addition to the
[[MediaWiki:Newpagetext]] warning users to do this themselves, the
software could search for pages with the same name but different
capitalisations - if it found one, it could add an extra message, such

NOTE: You are about to create a page called "microsoft windows xp",
but there is already a page called [[Microsoft Windows XP]]. Please
make sure you are not creating a duplicate of this page before
proceeding. If you followed a link in another article, you might want
to edit that page to refer to the correct name; if you think this is
likely to be a common mistake (or if there are already many pages
[[Special:Whatlinkshere/{{PAGENAME}}|linking to this title]]) you
might also consider creating a [[Help:Redirect|redirect]] to the
correct title.

While this would add the burden of an automatic search every time a
red link was followed, this would logically be less than having to
search case-insensitively for *every* link.

Meanwhile, my point stands about how you would find and correct links
which had been typed wrong if they were all treated as references to
the same page - there's no obvious mechanism for using "what links
here" to see which pages use "[[microsoft windows xp]]" and which
"[[Microsoft Windows XP]]" if those titles are not treated as

But perhaps I should be more open-minded and offer solutions as well
as problems. If the links tables were all id->name pairs (as seems
sensible, and could perhaps be brought in along with unifying them w/
a link_type field), the references in the database could conserve the
exact capitalisation of the link. Assuming an efficient
case-insensitive DB query is possible elsewhere, it would then be no
stretch for Special:Whatlinkshere to look up all variant
capitalisations at once. Then, it could sort its output by how the
link was typed, and those which represented "incorrect"
capitalisations could be identified, and the pages corrected.

> (Btw, sorry, for copying e-mails to your personal e-mail address)
*shrug* it happens. I filter on the subject field anyway, so I barely notice. :)

Rowan Collins BSc

More information about the MediaWiki-l mailing list