Skip to content

Redirect pages drop trailing content after the #REDIRECT line #14

Description

@JeroenDeDauw

Problem

MarkdownContentHandler::makeRedirectContent() appends body text after the #REDIRECT [[Target]] line (matching core's signature), but fillRedirectParserOutput() renders only MediaWiki's redirect arrow and calls setRawText(''). It never parses or registers the trailing markdown. Core's WikitextContentHandler does the opposite: it shows the redirect header and parses the remaining content.

Impact

A redirect page such as:

#REDIRECT [[Target]]

[[Category:Redirects from acronyms]]

shows the arrow but is not placed in the category, and any trailing links/categories/prose are stored (they round-trip via action=raw) yet stay invisible and unregistered. The same page in wikitext would be categorized. Real-world frequency is low (page moves create redirect-only content), but it is a genuine store-but-don't-render inconsistency, made concrete by makeRedirectContent() deliberately appending $text that nothing then renders.

Options

  • Render the trailing body below the redirect header (wikitext parity, so redirect categories and rcat-style content work), or
  • Stop appending $text in makeRedirectContent() and document that markdown redirect pages hold only the redirect line.

Introduced in #11 (redirect support); surfaced during its code review.


Filed by Claude Code (Opus 4.8 (max)) at Jeroen De Dauw's direction, from the code review of #11. Jeroen sets direction and reviews. Identified with Claude Code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions