4. Housekeeping

Now that you've seen how the six tools can be used for hypertext editing, we will discuss a few problems that can arise when you try to apply the tools discussed in this chapter and solutions to those problems.

4.1. When a Page Move Is Blocked

Suppose you want to move article P to title Q, but the MediaWiki software blocks the move. P and Q might be articles on identical topics; then you will need to merge the articles.

If the other article Q is on a different topic than P but uses the same title that you wanted to use for P, then you need to create a disambiguation page for the main term and move the other articles to appropriate titles, which will then be linked to on the new disambiguation page. For instance, you might want to move [[Jolly Green Giant]] to [[Green Giant]]—but you'd find that [[Green Giant]] is already taken up with a page about the company. You could move the page [[Green Giant]] to [[Green Giant (company)]], and [[Jolly Green Giant]] to [[Green Giant (symbol)]]. Then you could go back to the page [[Green Giant]]—it will be a redirect to [[Green Giant (company)]] from the move—and edit it to be a disambiguation page pointing to the two articles. Any other articles about green giants could also be listed. The page [[Jolly Green Giant]] will be automatically turned into a redirect to [[Green Giant (symbol)]], but you'll need to check for double redirects and add hatnotes to the two articles pointing back to the disambiguation page. This series of actions will help this small corner of Wikipedia make more sense to the reader.

Sometimes the situation is more complicated. Page moves to temporary dummy titles can help. You can tag any unneeded redirects you create for speedy deletion when you're done. See [[Help:Moving a page]] for more guidance and [[Wikipedia:Requested moves]] to request administrator help with moving a page.

4.2. Default Meanings

Sometimes an article about a lesser character, say from an anime or comic, will be created before the article about a more important figure with the same name. A disambiguation page should be created in this case. For the good of the encyclopedia, the lesser character shouldn't become the default meaning, however. For example [[Thor]], the Norse god, must have priority over [[Thor (Marvel Comics)]]. Problems of this type have to be sorted out by someone who understands blocked page moves.

Moves are best made from a more general title to a more particular title: from [[John Jones]] to [[John James Jones]], for example. That leaves the way open to making [[John Jones]] a disambiguation page. Moving uphill, or removing information from a title, is sometimes more problematic. Removing information can often make a title ambiguous, for example, moving [[George W. Bush]] to [[George Bush]]. If you remove information from a title, you risk deciding on the Wikipedia default meaning: You may be telling the world that John Jones should be read as John James Jones.

In other words, make titles more informative and specialized to the topic. But don't add titles like Dr., honorifics, or post-nominal letters like initials after names; this is against Wikipedia conventions. Moving articles to more general titles should be used mainly for verbose titles, like moving [[List of Japanese Government and Private institutions and Groups (from 1930s to 1945)]] to [[List of Japanese institutions (1930–1945)]].

4.3. Avoiding Disambiguation Pages

Wikilinks in articles should generally point to the exact article title meant, not a disambiguation page, since a link with a variety of possible meanings can be confusing to a reader unfamiliar with a topic. The process of changing wikilinks to point to precise articles instead of disambiguation pages is called avoid disambiguation pages. Generally, this work is done by checking What Links Here for disambiguation pages.

Here's an example from the article [[Rectangle]]. The initial text in the article was

A [[square]] is a special kind of rectangle where all four sides have equal
length;

But [[Square]] is a disambiguation page, which includes the meaning [[Square (slang)]] for an un-hip person. To avoid the dab page, change the link to [[Square]] to the following:

A [[square (geometry)|square]] is a special kind of rectangle where all four
sides have equal length;

The text now reads the same as before, but the destination of the wikilink is precise and correct. If an article using the precise meaning of a term hasn't been created yet, use a red-and-piped link rather than linking to the disambiguation page (which would be confusing). The redlink may also prompt someone to create the new article.

4.4. Controlling Category Sorting

Pages within categories are displayed alphabetically by the first word of the page title, but this order can be modified by sort keys.

[[Category:Presidents of France]] may look quite ordinary (Figure 8.6, “[[Category:Presidents of France]]”), but a few things are going on here. Under the letter G, you'll find the article for Charles de Gaulle. Under N, you'll find the article on Napoleon III of France, but under S (not N), you'll find the article on Nicolas Sarkozy. The case of Sarkozy obviously fits sorting by surname, but what else is happening here? Napoleon III was a president before he was an emperor, but his surname was, of course, Bonaparte. De Gaulle is a surname, but using the appropriate convention for French names, the de is not considered here.

Figure 8.6. [[Category:Presidents of France]]

[[Category:Presidents of France]]

In a category, you would generally expect the article [[John Smith]] to be sorted under S for Smith rather than J for John. Wikipedia has two ways to achieve this result: magic words and sort keys. These two approaches have the same effect—making category listings treat the [[John Smith]] page article as if its title were Smith John—but magic words affect every category a page is in, while sort keys only work one category at a time. Each is highly flexible.

The magic word for default sort is used like a template:

{{DEFAULTSORT:}}

For the page [[John Smith]], it would be filled in like this:

{{DEFAULTSORT:Smith, John}}

and placed in the wikitext above the list of categories. To classify [[Charles de Gaulle]] under G, the template would be filled in this way:

{{DEFAULTSORT:Gaulle, Charles de}}

The use of this template affects every category page that Charles de Gaulle might be placed in (potentially dozens); the article will always show up sorted under G.

To only sort an article in a single category, or to vary sorting according to the category, use a sort key, which is added after a pipe character placed in the Category link in the article text:

[[Category:1900 births|Smith, John]]

If you want to list Napoleon III under B for Bonaparte, for this particular category, enter

[[Category:Presidents of France|Bonaparte, Louis-Napoleon]]

on the page [[Napoleon III of France]]; that will affect just how the article is sorted in the category Presidents of France. See [[Wikipedia:Categorization#Pipe tricks and sort keys]] for more examples and explanations.

Although titles usually consist of plain text, they may begin with other symbols. The ordering used for category sorting when extended to non-alphanumeric characters is ASCII order, a standard used in byte codes for computing. Article titles beginning with numbers come before article titles starting with the letter A and article titles starting with symbols are always displayed before these, using a particular order for symbols. The article [[(Like) Linus]], beginning with an opening parenthesis and about a demo by The Deftones, would precede the article about [[@Home Network]], a defunct ISP, beginning with @, if these two articles were ever placed in the same (unlikely) category.

The use of ASCII order explains one more thing about the Presidents of France category page. The listing starts with [[President of the French Republic]], under an asterisk (*). This is because in the article [[President of the French Republic]], the category tag reads

[[Category:Presidents of France|*]

The asterisk is a device for bringing the article to the top of the listing so it is much more prominent. This method is commonly used for highlighting the main article in a category—the article that will give the reader an overview of the whole topic. A blank space after the pipe character is an extra refinement and has the same effect except no asterisk is included on the category page.

4.5. Categories and Templates for Redirects

Certain links on a category page may appear in italics. This is because these are links for redirect pages. If you click the link, you go to the page to which the redirect leads (not to the article with the title you expected).

The probable explanation is this: The redirect is anchored to a section of an article, and the category is right for that section but would be odd for the whole article. For example, the article might be about an author and the section about a film made from one of the author's books: Placing the author's name in a film category wouldn't be correct.

Another example of how to use this device is illustrated by the French Presidents example. [[Charles Louis-Napoléon Bonaparte]] is a redirect to [[Napoleon III of France]]. The category tag [[Category:Presidents of France|Bonaparte]] could be included in the redirect, so the category page would include the correct name for his time as president and be sorted under Bonaparte.

Templates on redirects are mostly used to flag redirects that could usefully become articles in their own right. See [[Category:Redirect templates]].

4.6. Process-Style Resolutions

Your problem may have a resolution, if you only knew where to go to get an answer.