MediaiWiki Naming conventions (technical restrictions)
|
Some article titles cannot be named correctly due to limitations in the MediaWiki software, Eg. the first character is forced to be upper case. Currently known limitations are listed below in this article, though there may be others. Where you want to draw readers' attention to this kind of situation, insert something like this before the opening paragraph of the article: {{wrongtitle|title=Correct Title}}
Which will produce the text: For a list of articles that are affected by these problems, see Special:Whatlinkshere/Template:Wrongtitle.
[edit] Excluded characters[edit] Characters not allowed at all in page titlesThe following characters are not allowed in page titles: # < > [ ] | { }
and the ASCII character codes 0-31 and 127. Attempting to use disallowed characters will result in a "bad title" error. [edit] Forward slashThe forward slash (/) is used to separate subpages from their main pages. While subpages are now disabled in the main namespace there are still a couple of side effects of the system to support them that affect articles.
[edit] Question markSpecial attention should also be paid to the use of the question mark (?). A page like Switch? (The Price is Right pricing game) can be created as usual by following the link. However, when typed into the address bar of a browser, everything following the question mark will be cut off. For example, typing in http://en.wikipedia.org/wiki/Switch?_(The_Price_is_Right_pricing_game) will cause you to be directed to switch. Instead, use http://en.wikipedia.org/wiki/Switch%3F_(The_Price_is_Right_pricing_game) This is a consequence of web server software treating everything after a ? as a query string. Whilst it would be possible to glue the url back together this would cause issues with urls like http://en.wikipedia.org/wiki/Switch?action=edit which is equivalent to http://en.wikipedia.org/w/index.php?title=Switch&action=edit [edit] PlusThe symbol + can sometimes cause problems when used in URLs. In URLs using the "/wiki/Article_name" notation the plus sign has no special meaning, but in the "/w/index.php?title=Article_name" notation (and in the parts of an URL after the question mark in general) the plus sign is replaced with a space. To get an actual plus sign, it must be encoded as "%2B". For example, http://en.wikipedia.org/wiki/C++ will lead to the article on the C++ programming language, but http://en.wikipedia.org/w/index.php?title=C++ will lead to C instead (as the trailing spaces are stripped). To avoid this, use http://en.wikipedia.org/w/index.php?title=C%2B%2B instead. [edit] Spaces and underscoresIn links spaces and underscores (_) are treated equivalently. The underscore is used in the url while the space is used in displayed titles. This was done to make the urls for page titles containing spaces more readable. Leading and trailing spaces and/or underscores are stripped, multiple spaces and/or underscores are squashed together to a single underscore and page names consisting of only spaces and/or underscores are not allowed at all. However, an article name cannot contain an underscore as the underscore would be converted to a space. [edit] DotPages named . or .. and page names starting with ./ or ../ are not allowed at all. Pages with dots and slashes combined in certain other ways, e.g. /. (which is a redirect to slashdot), are allowed by MediaWiki, but there are major problems with links to them (probably caused by path parsing code in browsers, but see also #Forward_slash above). [edit] PercentMediaWiki supports percent-encoding in wiki links, in which a percent followed by two hexadecimal digits is converted to a single character. Thus, %25 is the same as %. Article titles containing a percent-encoded sequence are not allowed. For example, [[%2542]] should link to "%42", but doesn't link anywhere. A possible workaround would be to use non-ascii characters that look the same as the ones required; however this may create issues with older browsers. If the two characters following the percent do not form a valid pair of hexadecimal digits, it works as expected. [edit] Subscripts and superscriptsCurrently, there is no way to directly include subscripts or superscripts in a page name, unless you use the unicode characters (which do not work well in some browsers), the way they would normally be included in an article (using <sub> and <sup>). Examples: NaKATPase, Lp space. Attempting to workaround using Unicode subscripts and superscripts does not work on all browsers (depending also on the installed fonts and operating system), and only a small number of subscript and superscript characters exist on Unicode. However, superscripts ¹, ², and ³ do not have the same browser support limitations and can be used without problems, as long as a redirect from the title without the superscript is used.
[edit] Pictorial namesMediaWiki does not support including an image in the title of an article. Such images should be replaced by Unicode characters. [edit] Title lengthTitles must be less than or equal to 256 bytes long when encoded in utf-8.
[edit] Configuration related limitationsThe following limitations are not due to the MediaWiki software but to the settings of the English language Wikipedia. See the appropriate policy pages. [edit] Lower case first letterEvery link in Wikipedia is forced to start with a capital, though subsequent characters can have any case. This decision has been reached because :
Thus when a link occurs as the first word of a sentence its first character is forced to upper case and (given the case sensitive linking) it would be broken if it linked to an entry with a leading lower case character. There are numerous possible solutions to this issue, but the one that has been adopted is to set the English language encyclopedia to require an upper case character as the first letter of a page title, and force every link to have an upper case first character. |
