Page MenuHomePhabricator

Text in the same line as #redirect not rendered, except for category tags
Closed, ResolvedPublic


Author: Progman2002

If I want to add a category to a redirect­page, it wont save it. It save the category
only if I add the redirect and the category to a new page. If I want to change the
redirect or the category/ies I must delete the page (so I need some admin-status) and
readd the page with the new redirect and/or the new category/ies.

Version: 1.4.x
Severity: normal



Event Timeline

bzimport raised the priority of this task from to High.Nov 21 2014, 7:04 PM
bzimport set Reference to bz927.
bzimport added a subscriber: Unknown Object (MLST).

artslave wrote:

Categories only work if they are on the same line as the REDIRECT -- anything after a
newline (Return or Enter) is discarded.

qleah wrote:

This bug additionally renders the {{r from ...}} templates useless.

zigger wrote:

The {{r from ...}} templates work, including the categorisation, on the same
line as the redirect. See

bugzillas+padREMOVETHISdu wrote:

These {{R from ...}} templates used to work on redirects until the upgrade to
1.4beta3, see does show
the category though.

See any of the subcategories of [[Category:Redirects]] for the effect of this
bug -- no redirect page categorised.

Making priority "high" as the bug is live on w:en: and renders categorisation of
redirects useless.

bugzillas+padREMOVETHISdu wrote:

[[Winston Salem, North Carolina]] is a curious exception, in which the template
tag *does* work. But in this case the redirect icon is not shown. Looks like
either things in the same line as the redirect would work xor the redirect icon
is shown, but not both together.

rfl wrote:

The "Winston Salem, North Carolina" no longer works
(it might have been a cached version of an older (working) redirect page). Right
now no redirect templates
[] seem
to work. Everything seems to be fine in previews and diffs
(where there is "#REDIRECT" shown instead of the picture and the large link)
but not on the actual redirect pages
[] where
there is no template message and category link. Also, the entire
Category:Redirects hierarchy []
is empty, containing only the templates themselves, not the redirect pages using
This problem appeared after upgrading English Wikipedia to MediaWiki 1.4. I have
never seen a redirect page with the new layout with large type and redirect.png
with working redirect templates. Please see my comment on Wikipedia
talk:Template messages/Redirect pages

bugzillas+padREMOVETHISdu wrote:

The redirect still gets added to the Whatlinkshere of the template. e.g. after
my edit:,
[[Dfid]] got added to [[Special:Whatlinkshere/Template:R from abbreviation]].

Redirect pages can't contain other content, as that causes fun problems.

bugzillas+padREMOVETHISdu wrote:

What kind of "fun problems" are caused? These did work earlier, didn't they?

Note that the content has to be displayed only when redirect=no is specified, in
which case the redirect just works like a normal page. Why can't the entire line
of Wiki code be rendered just like the way the redirect [[foo]] portion is rendered?

Currently I see that any category tags in the same line as the redirect are
rendered, and even category tags in a template transcluded in the same line as
the redirect are rendered. So why not the template text?

Note that even if any wiki text in the lines after the redirect line is ignored
and not even saved, why ignore the text in the same line *while rendering* (note
that the whole line is saved, only while rendering the whole line is not rendered).

artslave wrote:

There are several reasons the ability to categorize redirects is useful:

  • to facilitate classification for exclusion from print-Wikipedia
  • to facilitate systematic clean-up (for instance, deletion of redirects in the

form of "xxx (Axxx) → xxx (axxx)")

  • to facilitate and document consensus implementation around naming conventions

If there's a way other than templates or same-line categorization to do this,
let us know, Brion.

As I recall, Tim relaxed the same-line restriction. Can you confirm?

en.ABCD wrote:

Currently, redirects do not display any content except categories (and the usual
image & link), however, the category does not have to be on the first line. See

gangleri wrote:

(In reply to comment #5) (In reply to comment #6)

[[Winston Salem, North Carolina]] is a curious exception, ...

Opened NEW
Bug 4917: Perform %nn character, precombined character and other normalisations
before rendering a redirect

There are more requirements about the rendering of a redirect. I was
investigating on this because v~andals could identify a place to post sp~am.
This is why my personal opinion is to render the "additional" page source.

Some other related requirements are contradictory / more sophisticated:
Bug 2012: Redirect Pages which have extra Text have them placed on top of
Article they redirect to
I do not understand what exactly is the requirement of
Bug 1399: Edits on redirect-pages are ignored
"The code that checks if an article is a redirect should first check if the
article has only one non-empty line, else it's not a redirect. That way, edits
would no longer be
ignored and the behavior would be less confusing to the user."
This contradicts with some of the requirements here: *from* comment 9: "Why
can't the entire line of Wiki code be rendered just like the way the redirect
[[foo]] portion is rendered?"

Another important decision would be to give some recommendations for the *exact*
syntax for redirects to images and categories: Must inline links be specified or
not. Test cases for images are available at
using #REDIRECT [[image:foo]] and *not* #REDIRECT [[:image:foo]] from
Bug 1103: When redirecting to an image description page, the redirect works but
the image is not show.
using #REDIRECT [[image:foo]] and *not* #REDIRECT [[:image:foo]]
but rendering different because this image is from the shared repository / commons:

What about redirect to categories and inline syntax?

Bug 4873: Next and previous revision links hidden on old-revision view of
redirect text
relates to history/diff rendering of redirects see

best regards reinhardt [[user:gangleri]]

gangleri wrote:


I just want to add that what you see as rendering of the "Current revision" at
is *not* the rendering of the current revision.

William.Allen.Simpson wrote:

Still some oddities going on with redirects, hard to put a finger on them.

Confirmed that categories and templates both currently work today, on the
same line, or on the next line.

However, templates that change, and are on the next line after the redirect,
do not seem to cause "touch" in a few days by the job queue.

Moreover, I ran into a couple of pages that had a large amount of old text
after the redirect. This produced a hilarious amount of nested levels of
"redirect" in the What Links Here, and seem to be added to the WLH of pages
they have no links to (which is how I saw them both).

My guess is allowing categories and templates to be on successor lines, also
caused some rather strange link indexing behaviour. Could we have a restriction
that ONLY categories and templates should be on successor lines?

(I never had a problem with the old way, myself, it wasn't very hard to follow
instructions. But now lots of folks are putting them on successor lines, so it
would be hard to go back.)

The original issue (the single line restriction) is long since fixed. Any other
issues should be reported separately.