Help:What links here/demo rdcheck

From Wikipedia, the free encyclopedia

The report from rdcheck.py has many features. What are they? Demonstration?

On the "What Links Here" page, rdcheck.py is the external tool that is run from "Show redirects only", but what are the differences from "Show redirects"? Help:What links here#Redirects says that that list of redirects show double redirects. Does the rdcheck.py report show double redirects?

This subpage is an attempt to document and demonstrate aspects of the rdcheck report.

Glossary[edit]

There are three categories of redirected wikilinks:

  1. #REDIRECT[[pagename]] that redirect to pagename
  2. #REDIRECT[[pagename#section]] where pagename is canonical
  3. #REDIRECT[[pagename#section]] where pagename is a redirect

A redirect is a page whose content is a link, serving as an alias for a pagename.

For article space, a redirect is a pagename alias or a section alias. Outside article space, we speak of cross-namespace redirects to fullpagenames.

A canonical page name is what the title line says it is, on the page with the actual content. For example, the linksto search parameter only accepts a canonical pagename. But more accurately, it is the value of {{FULLPAGENAME}} as rendered on that page. A difference between the title and the canonical page name occurs when {{DISPLAYTITLE}}, or {{lowercasetitle}} is used.

"What Links Here" calls transclusions and redirects a link. But a redirect just whizzes by, transparently and hardly noticed, whereas a wikilink or URL-style link is an inviting hyperlink. A transclusion is a "link" also, in the context of subpage link notation, where transclusions and wikilinks share a common markup shortcut. A redirect is not a link for the search parameter linksto, and, like the disambiguation page, is not a full-fledged pagename.

A section name is a section heading, section anchor, or section id. They are all names. (The last two both insert <span id="section name">...</span>.) A redirect always goes to the canonical page name (the title) but it does not always go to the "canonical" section heading (its title). When a redirect goes to a section name it could be an anchor or section id #name placed anywhere in the wikitext, not just at or within a section heading.

Redirects with a section of a pagename happen when

  • The subject is too narrow for its own page, but often needs linked.
  • The section heading is likely to change titles. Any code can be used for the redirect section name. If the section title changes, the redirect still works to a section name embedded in the heading.
  • The redirect title is intended to show all links to a section in a What Links Here report.

The same section name works in redirects, URLs, and wikilinks. A redirect is a page name alias, but redirect to a section is not necessarily a section heading alias.

Rdcheck reports redirects to content, not to a name. (No matter which title you give it, you get all the redirect titles.) So rdcheck gives the same report for all aliases, even if the alias has a section name attached to it.

Redirects[edit]

To titles[edit]

"No anchor or section" is a level one heading, grouping the pagename aliases. These have the form

#REDIRECT [[pagename]] that redirect to pagename

It doesn't mean that the pagename has no redirect to a section. It means the redirect itself has no anchor or section. It might be titled "Redirects to the title line", but the report is very section-oriented saying "none here".

To sections[edit]

Redirects to a section are like

#REDIRECT [[pagename#section]]

The WLH procedure to "show redirects only" hides links. Rdcheck shows only redirects. How do we then list navigable links to content of a section? We need rdcheck. See Help:Link#Link reports.

Rdcheck gives the section name a level one heading, and under that are grouped all the redirects to it.

If a particular section name is not explicitly listed, that section has no redirects to it. On the other hand, all redirects listed under any section can have incoming links that will then go to that section.

Hidden links[edit]

Rdcheck may report a warning — Hidden links on redirect — and an explanation These redirects have more than one link. This causes problems with WhatLinksHere since it does not determine redirects, instead listing backlinks which are also redirect pages..

This occurs, for example, when a full fledged page with many links was converted to a redirect page with markup at the top of the page, while retaining all its content with its wikilinks below that markup, like "Ardence" does.

Invalid[edit]

When a level one heading that is a section name is labeled "invalid", it means the redirect is invalid because the section name no longer exists. It may mean that a plan to use a single redirect to a codified anchor in order to be able to rename section headings without worrying about breaking a link to that section failed in that case.

Setup for these pages to demo rdcheck[edit]

All Help:What links here sections should show up, except See also is purposefully omitted. Here are their redirects:

  1. Overview Help:What links here/Rd1
  2. Limitations Help:What links here/Rd2
  3. Redirects Help:What links here/Rd3
  4. Transclusion Help:What links here/R4
  5. Number of links Help:What links here/Rd5
  6. Finding external links to a page Help:What links here/Rd6
  7. Extensions and programming Help:What links here/Rd7
  8. Examples Help:What links here/Rd8

Double redirects[edit]

Help:What links here/double rdcheck is a redirect to WP:WRH. Therefore it is a double redirect (from a subpage).

It also links to even numbered sections, so rdcheck should report yet another redirect linking to a section. Which title will it be? WRH? double rdcheck? WLH/double rdcheck? Let's see.

Notes and references[edit]