Last modified: 2007-05-21 16:45:52 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T2098, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 98 - Pages beginning with slash sometimes allowed
Pages beginning with slash sometimes allowed
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
All All
: Normal minor with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: 116 8046 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2004-08-16 06:01 UTC by Timwi
Modified: 2007-05-21 16:45 UTC (History)
3 users (show)

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

Tested patch that makes any title with / as the first character invalid (597 bytes, patch)
2006-10-27 08:54 UTC, Andrew Garrett

Description Timwi 2004-08-16 06:01:30 UTC
Originally submitted by Nobody/Anonymous - nobody  2004-06-22 17:04

For redirect pages that go to a page title that begins
with a '/', when the redirect page is viewed with
&redirect=no, the '/' is not shown in the link and
these redirects are seen as broken by

An example of this is:

which displays a link to [[Gwi language]] (which does
not exist) instead of [[/Gwi language]]. The redirects
works if &redirect=yes

------------------------- Additional comments ------------------------
Date: 2004-06-22 19:17
Sender: SF user imsop

Actually, the problem is wider than you think: no link can
point at a page beginning with "/". The reason is that in a
namespace where subpages are legal (e.g.
[[Wikipedia:Sandbox]]) it will be treated as a subpage link
(e.g. to [[Wikipedia:Sandbox/Gwi language]]). In Wikipedia's
article namespace, subpages are disabled, so the software
removes the slash as being erroneous.

The bug is that you were able to create a page with such a
title in the first place. (And that the redirect *does*
work, even though the links don't; a consequence of the
rather ad hoc parser, I suspect).

Workaround: move the pages so they don't begin with slashes
- awkward, I know but they won't be the only ones - see

This bug should stay open until someone blocks such pages
from being created accidentally.
Date: 2004-06-28 04:46
Sender: SF user vibber

This page title should not work under the current schema.
That is does is erroneous, as it can't be reached through
normal links:

Renamed bug report to reflect the root problem.
Comment 1 Rowan Collins [IMSoP] 2004-08-16 23:13:47 UTC
*** Bug 116 has been marked as a duplicate of this bug. ***
Comment 2 Wil Mahan 2004-09-13 22:07:31 UTC
Hi, my patch at bug 428 should allow articles beginning with slash to be linked
normally, although it only applies when subpages are disabled.
Comment 3 Zigger 2005-05-22 12:37:52 UTC
See also bug 2088.
Comment 4 Andrew Garrett 2006-10-27 08:54:55 UTC
Created attachment 2582 [details]
Tested patch that makes any title with / as the first character invalid
Comment 5 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-11-06 04:43:53 UTC
Applied in r17454.
Comment 6 Rotem Liss 2006-11-06 13:22:43 UTC
Reverted on 17456 by Simetrical, because several pages with this name are
already exist.
Comment 7 Rob Church 2006-11-06 20:08:49 UTC
Don't we have a script to clean up dud titles and rename the pages?
Comment 8 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-11-07 02:51:49 UTC
Probably, so if anyone would care to run it . . .
Comment 9 Tim Starling 2006-11-07 04:00:15 UTC
Why not fix the linking code, instead of disabling initial slashes? In cases
where there is a conflict with subpage syntax, you can just specify the
namespace, e.g. [[User:/Foo]] or [[:/Foo]]. 
Comment 10 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-11-07 04:08:18 UTC
The linking code appears to work fine at present, although if you're in a
namespace with subpages it requires the leading colon.  Should either be FIXED
Comment 11 Brion Vibber 2006-11-28 01:48:59 UTC
*** Bug 8046 has been marked as a duplicate of this bug. ***
Comment 12 River Tarnell 2007-05-21 16:45:52 UTC
can't reproduce the original behaviour here, presumably it's been fixed at some point.

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