Page MenuHomePhabricator

Self-redirect gives blue link to itself but probably shouldn't.
Open, Needs TriagePublicBUG REPORT

Assigned To
None
Authored By
Bugreporter2
Jun 9 2025, 9:49 AM
Referenced Files
F62280230: image.png
Jun 10 2025, 6:05 AM
F62244762: image.png
Jun 9 2025, 9:49 AM
F62244410: image.png
Jun 9 2025, 9:49 AM

Description

Steps to replicate the issue

  • Create a sandbox page, e.g. at [[Foo]] and add a self-link to the page to [[Foo]] (a self-link, not a self-redirect). Note the behaviour.
  • Create a self-redirect page [[Bar]] that redirects to [[Bar]].
  • Ignore the error that tries to stop you (pretend that the page has been made by someone else, maybe by accident, or otherwise).

What happens?:

The self-link doesn't function; it emboldens the text, but it doesn't become a link. Note this is useful on navigation templates.

The self-redirect doesn't function as a redirect, but instead displays #REDIRECT before a link to its target (i.e. itself, e.g. Bar), which can be clicked on. Clicking on the link reloads the page.

image.png (92×357 px, 6 KB)

There is also no error message. The viewer is left to work out what went wrong.

What should have happened instead?:

The page should probably have just displayed its text, without the link:

#REDIRECT[[Bar]]

image.png (70×417 px, 5 KB)

or wrap it in a <pre> tag:

image.png (76×416 px, 4 KB)

The option of also throwing a big red-lettered error message might also be considered.

This might change and prevent self-redirects from being identified as double redirects and appearing in [[Special:DoubleRedirects]] (it's a known false positive). In which case T396272: Special Page for listing self-redirects may then be a good idea.