Wikipedia:Disambiguation pages with links/Guide

A guide to dealing with disambiguation pages with links, applied at Disambiguation pages with links and Disambiguation pages maintenance.

This is a collection of tips and tricks discovered by experienced disambiguators in their bitter rounds. Anyone is welcome to add to it: none of us knows it all.

What to do if the link doesn't appear on the page
If you find a page that simply doesn't contain the name of the linked article, go ahead and hit Edit anyway, then try to find the link in the edit box. The cause is usually piped links. If you are disambiguating Vatican, for example, and the page doesn't have the word Vatican in a link anywhere, do your ctrl+F again in the edit box and you'll find the culprit is something like Holy See - which does link to Vatican on closer examination (  Holy See  ).

What to do if the link doesn't appear in the edit box

 * It may be part of a template that the linking page is transcluding; you'll have to work out which template it is and edit the template accordingly.
 * It may be linked via a redirect; the What Links Here page should tell you about this, and you'll need to search for the link to the redirect instead.
 * Very occasionally, the links database seems to get confused, and will insist that a page links to another when demonstrably it doesn't. If this is the case, try saving an unchanged version of the page; this usually fixes the problem. If the phony link remains, skip the page and leave a note on dam page.
 * Links occasionally appear in hidden sections (search for click show)
 * A last resort is to view HTML source (ctrl-U in most browsers), search for  (or occasionally  ), as in , note surrounding text, and search for that in the edit box.
 * Very occasionally, John Doe is linked as Doe, John.
 * John Doe has been linked as John_Doe.
 * Very rare, but not unknown: John Doe has been linked as John Doe (with an extra space).
 * Some templates don't make it clear that they are linking automatically. See Disambiguating links made by templates below for a non-exhaustive list.
 * The link may show up in Special/What links here and bot reports because it was generated by an ambiguous link in a template which has been fixed but which has not yet been purged. Try a WP:NULLEDIT, and see if the link disappears from Special/What links here.
 * Some templates split human names into given name and surname. You have to search for one or other part to find what's generating the link. Examples include:
 * John Doe creates the link John Doe . A third parameter is needed to correct the bad link; e.g., John Doe.
 * sortname has a special trap. John Doe ignores the fourth parameter, and links to John Doe . Just remove the double pipe.
 * American football player templates. These often split names into first and last. The solution is usually American football (or, position played) or John Doe (qualifier). Check before saving.
 * Association football templates. Fs player2 sort splits names into first and last. The solution is John Doe (footballer).
 * Basketball player templates. These often split names into first and last. The solution may be either basketball (or, basketball, born XXXX) or John Doe (basketball). Check before saving.
 * If a page has disambiguation link(s) but you don't know their target, try this API search: after replacing the text after titles= by the name of the page containing the link.  Search the output for "disambiguation" and read the "title" a few lines above it.  There may be more than one target.

Caveats

 * If a large number of links to a single disambiguation page appear all of a sudden, this is usually a sign of a recent event like a page move, topic restructuring or the retargetting of a prominent redirect. Often enough these get reverted, so it's best not to hurry fixing the links. If after a few days of this no reverts have occurred, and there are no indications on the involved articles' talk pages of ongoing discussions that could lead to a revert, then you can proceed to fix the links.
 * It's best to allow a week or so before fixing a dablink found within newly contributed text. Very often such text turns out to be problematic in more fundamental ways (e.g. it might not be reliably sourced or it might represent a partisan point of view) and it takes time for editors with subject expertise to review such additions. There's no need to waste time fine-tuning a piece of text that will end up getting thrown away.

Tools
Tools to make fixing the disambiguation pages easier and more efficient.
 * CorHomo
 * AutoWikiBrowser
 * Solve disambiguation.py
 * Navigation popups
 * Wikipedia Cleaner

Bots

 * Solve disambiguation.py exists under the Pywikipedia bot framework.
 * In the event of a dab link on a template being cleared, there will exist many "false positives" - "What links here" entries that don't actually link to the dab. Blank saving can fix this and the bot touch.py can automate the process. Request for false positives to be cleared on the talk.

Malplaced disambiguation pages
You may occasionally come across cases where the basename redirects to the disambiguation page (e.g. Fizbuz → Fizbuz (disambiguation)). If you have the WP:PAGEMOVER ability (given to WP:ADMINs as of right and to others on reasoned request), you should know what to do (see WP:ROBIN). If you don't have it, visit WP:MALPLACED and follow the instructions. Whatever you do, don't make a cut&paste move.

Editor's techniques
Below is a collection of various methods utilised by WP:DPL contributors.

Guide To Efficient Disambiguation
The following Guide to Efficient Disambiguation was originally established on the main project talk page by Agentsoo. It was then greatly enhanced by contributions by Veledan and Flowerparty, and continuing contributions from Agentsoo.


 * 1) Use CorHomo (or Wikipedia Cleaner) if possible, it will make everything much easier. The following suggestions only apply if you are doing the editing without its help.
 * 2) Clear your cache. Now visit the disambiguation page, and read it carefully. The more of the options you can remember, the easier it will be to disambiguate, so it's worth reading it several times. You may also wish to keep the disambiguation page open as a separate page, if your browser supports this. Your objective is efficient but correct disambiguation. The latter criterion is the more important.
 * 3) Click 'What Links Here' in the toolbox on the left, and it will show you the first 50 pages that link here. Often, a fair number of these will be redirects, or User:, Talk: or Wikipedia: pages. Whether you want to fix User pages is up to you; typically we don't, because they are of lesser importance and do not count towards the project's statistics. We don't fix Talk pages.
 * 4) For the next stage, it is worth using a browser that supports tabs (such as Firefox or Opera), as this will save you quite a bit of time. Click down the list of pages, opening each in a new tab. It's up to you how many pages you are going to fix in one batch. 25 to 50 is reasonable, although your browser may become sluggish if you open too many. In Firefox, the "Mouse Gestures" extension, which allows you to open a large number of links in tabs simultaneously, may be useful.
 * 5) By the time you finish opening those tabs, the first one should have finished loading. Scan the first paragraph; often you will see the link you are trying to fix right there. If so, click the Edit This Page link or (more efficiently) change your preferences to enable "Edit pages on double click" (under the Edit section), then just double click. The link should be distinctive as the only visited link on the page; it will be purple in the default skin. If you don't see it immediately, use your browser's Find function (probably Ctrl+F) to search for the relevant word. Once you find it, click the Edit button for the particular section. Editing only the relevant section is easier on the servers and will likely cause the page to load faster.
 * 6) While the first edit page is loading, switch to the next tab, and again find the relevant link. Repeat this along the list of tabs. By the time you start loading the last Edit page, the first one should have finished loading, so switch back to it.
 * 7) Now you have to find the link inside the edit box. This can be harder than it sounds. Internet Explorer's Find function will find the relevant term inside the edit box; Firefox's won't, although the Highlight feature will (for some reason). In Firefox, you can hold Ctrl and hit F and then Enter to quickly enable highlighting; the link should now leap out at you.
 * 8) Now for the fun part! You have to decide where to send the link to. Most of the time, this is not difficult, although sometimes it will require some thought. If you are unsure where to link to, leave a note on the Talk page - I am continually surprised at how quickly other Wikipedians respond to these notes and make the appropriate fix.
 * 9) If the link is unsolvable - that is, if the context provided on the page leaves no cues from which it can be solved, and a search of external sources provides no help - consider whether the link is necessary to the page at all. It is perfectly acceptable to unlink a term if the link itself serves no encyclopedic purpose.
 * 10) Keeping the "disambiguation link repair (You can help!)" message on your clipboard, ready to paste into the Edit Summary box, can be really helpful. This is probably the way that we recruit the greatest number of helpers, so it's well worth doing, and it saves you the trouble of summarising your edit yourself. For the user in a hurry: In Firefox, you can edit the article, hit Tab, End, then hold Ctrl and rapidly hit V, Enter, Tab, F, Enter; this will paste the message into the Edit Box, submit the page, switch to the next tab and highlight the appropriate links.
 * 11) Work your way through the tabs, editing each one appropriately.
 * 12) Once you're done, close all the tabs, refresh the What Links Here tab, and enjoy that wonderful feeling of altruism! Occasionally, you will see the same page appear again; this means that the page linked to the disambiguation page more than once. This is quite rare, so just open the page again and fix any other links.

Use more than one buffer
If you have access to more than one clipboard buffer use them. One buffer will probably have the "You can help!" message in it. But if your system supports a secondary buffer (or more), keeping the most common option from the disambiguation page there can also save a lot of time. For instance if you use Firefox under the X Window System, the browser has one buffer and text copied with the mouse another.

Again the most important thing here is to choose the best option, so take care not to let the presence of one option in the buffer influence your choice.

Making the right choice
Making the right choice for a disambiguation link repair does not always mean selecting one of the options presented on the disambiguation page. If a link is not helpful in an article it can be de-linked. On disambiguation pages themselves, excess wikilinks are undesirable (not least because they make using a bot to fix the disambiguations more difficult) and should be removed anyway. Useful guideline:
 * Only make links that are relevant to the context

Disambiguating links made by templates
Some templates generate wikilinks from their parameters in a way which works in most cases but requires special care for qualified titles. This page details some techniques which can be used to fix incorrectly generated links, especially those which lead to disambiguation pages.

Linked text can often be replaced by a piped link, even if the original text was not formatted as a link. This works because the template surrounds the text by square brackets only if matches a page title, leaving it as plain text otherwise. We can abuse this feature by making the "plain" text a piped wikilink. Example fix:.

Countries
Infobox country links to related articles in a consistent but complicated way. The resulting title is not always occupied by the desired article, especially when multiple countries share a common name such as "Virgin Islands".

For national flags and symbols, the target can be overridden with flag_type_article and symbol_type_article. Example fix:. The "Government" link can be changed with politics_link. That subtitle cannot easily be unlinked. If there is no relevant article than one option is a harmless target such as Government. Example fix:.

Infobox country is also used via several redirects such as Infobox former country.

Hatnotes and the like
More-or-less justifiable links to DAB pages are often found in hatnotes and other common templates such as main. All seem to accept the pseudo-pipe |, e.g. . And if they don't, they should. Report any that don't at Wikipedia talk:Disambiguation pages with links.

Journals
The abbreviation field in Infobox journal looks for a page with that name. If it finds it, it doesn't link to it; but instead creates a blacklink in the subject article and a spurious link in Special/What links here in the target DAB page. Solution: add the undocumented field yes to the infobox.

La and Article
Templates with disambiguation links often reports that La links to dab Article. The link transcluded via Template:Ln/doc doesn't need attention. The report indicates inappropriate use of Article in one or more articles, which can be identified using Special:WhatLinksHere/Article. (Limit to main namespace and hide redirects, using the options concealed in the "What links here" dropdown.) To fix, replace  by a citation template such as Cite journal, translating its parameter names, and any month names in dates, from French. This can be achieved with Cite web/French or by manually applying the translations suggested in its documentation.

Languages
Several templates assumes that X language is an article about, or a redirect to, the language named X. This assumption is generally true, and Module:Lang/data now handles exceptions such as Mono language. It is coded flexibly so that other exceptions can be added by a template editor. Some templates accept an ISO 639 code rather than a name, e.g. lij for Ligurian.

Railway stations
Railway station templates deal well with disambiguation. Although they make assumptions about the exact format of article titles, those assumptions are generally true, or at least there is a redirect from the assumed title. Simple example: → Newport but  → Newport.

Station
Template Station, usually abbreviated to stn, takes one unnamed parameter in the obvious way: → Richmond. Unusually, disambiguation is provided by the third parameter, e.g. → Richmond. Beware that adding any value as the second parameter capitalises the word Station instead: → Richmond. This behaviour differs from STN, where the qualifier is the second parameter: → Union.

S-line
Many station articles show adjacent (next and previous) stations and terminal ("toward") stations of the line, giving four station links per line which may require disambiguation. Two templates are widely used: S-line and Station link. In each case, adjacent stations are treated differently from terminal stations.

The S-line template accepts state1 to disambiguate the previous (left adjacent) station and state2 to disambiguate the next (right adjacent) station.

The UK variant S-rail-national behaves similarly except that its disambiguation parameters are called county1 and county2.

Disambiguating terminal stations with S-line is more complex. Example fix:. Chicago Union Station linked to Tacoma instead of Tacoma, Washington. Here, system σ is "MILW", the bad link was on the left and line λ is "main", so S-line/MILW left/main reveals the station abbreviation α as "Seattle or Tacoma". This mechanism is being phased out; this example was superseded by Module:Adjacent stations/Milwaukee Road which works as described in the next section.
 * 1) View the article's source and identify the template corresponding to the rogue link, noting the text represented by σ and λ.
 * 2) View Template:S-line/σ left/λ or Template:S-line/σ right/λ, depending which end of the line contains the link; its text should be a station abbreviation α.
 * 3) Edit Template:σ stations, adding or updating the entry beginning with α=. (If appropriate, consider carefully updating a generic entry instead.)

Station link
The newer Station link, which usually appears as its redirect stl, has a different solution. Adjacent stations can be fixed by editing Lua code in "Module:Adjacent stations/σ", where σ is the system code after stl. For example, Line 21 (Guangzhou Metro) was linking to dab Changping station. The cause is, which is a wrapper around. Looking up the code "GZM" gives us Module:Adjacent stations/GZM. That module consists of a require statement (Lua's equivalent of a soft redirect), telling us that fixes the problem.

Terminal stations with Station link are also fixed in "Module:Adjacent stations/σ", despite its name. Again, σ represents the system code supplied to the template in the article. Find the line code in the "lines" section and change its "left terminus" or "right terminus" to one of the codes declared in the "station format" above.

Occasionally, the line description may contain ambiguous links such as "Springfield line". These can be fixed in Template:σ lines, where σ represents the system code described above.

Road junctions
The road junction template Jct has parameters dab1, dab2, ... which can be set to qualifiers for the first, second... road. For example,   links to M8 motorway (Scotland) rather than to the dab M8 motorway. Jct also has an undocumented y parameter, intended to permit plain text with no wikilink. It can be abused to supply a piped link: &#91;[Town, Area. This technique also works with clones such as Jcon (JunCtion ONtario). Example fix:.

Sort
generates the link John Doe.

To disambiguate the link, add a qualified and linked second parameter: John Doe (anonymous).

To blacklink, add a qualified and unlinked second parameter: John Doe

Taxonomy
Each taxon X has a template called Taxonomy/X, which can be viewed by clicking the red pencil icon on the right side of the "Scientific classification" line of the taxobox. Its link parameter is set to the contents of the link, excluding the square brackets. Normally this is a simple name such as Mollusca. It can be set to a piped version such as Kalinga (gastropod). Example fix:. Note the use of a literal | rather than {{!}}. You might expect this edit to set link to "Kalinga (gastropod)" and add a useless unnamed parameter "Kalinga" but, due to some magic, it works.

Topic and place
Links such as Communism in India and Military of Libya can result from templates which apply similar text manipulation to a category of places. For example, Communism in Korea uses, which forms links by prefixing each Asian nation by "Communism in ". Such links usually lead to articles but can exceptionally lead to a dab. Converting the disambiguation page to a BCA or SIA may be appropriate in some cases. Otherwise, this problem is not yet solved.

Wikidata labels
Some templates use Wikidata to identify related items, such as the riders in a cycling race, and attempt to link to the Wikipedia articles associated with those items. Unfortunately, a workaround for a different problem causes some of these links to be incorrect.

A Wikidata item can be associated with a Wikipedia article but not with a redirect. (Wikidata reached a consensus to allow redirects and recently discussed the matter again, but is still configured to prevent redirects from being associated.) Some templates have developed a workaround whereby, if the Wikidata item has no associated article, the item's English label is used. Sometimes that label matches a redirect to the relevant Wikipedia article. Sometimes it matches an unrelated article. Sometimes, as in the case of Q56883920, it leads to a dab.

A fix is to change the Wikidata label to a title not used in Wikipedia, if that can be done without disrupting Wikidata. A more drastic solution, as used at, is to briefly replace the Wikipedia redirect page by a dummy article, associate that article with the item, then revert to the redirect. Certain templates can be fixed in specific ways. However, the general solution to this problem is for Wikidata to implement its decision to unblock redirects so that Wikipedia's template workarounds can be removed.

Navboxes
Some navbox templates, especially those listing villages, consist mainly of redlinks, dabs and links to irrelevant topics. Identifying the latter can be tedious. A shortcut is to preview the template in a sandbox with links replaced by Annotated link. This will show short descriptions, quickly revealing unrelated targets which need to be redlinked with a ", Ruritania|" suffix. Certes (talk) 20:21, 18 November 2021 (UTC)