Last modified: 2012-02-10 19:52:01 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T20775, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 18775 - Redirect preview rendering stops prematurely, hides categories
Redirect preview rendering stops prematurely, hides categories
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
unspecified
All All
: Low trivial (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-12 14:28 UTC by Laurence 'GreenReaper' Parry
Modified: 2012-02-10 19:52 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Patch to fix the bug (2.28 KB, patch)
2012-02-03 21:40 UTC, Brad Jorsch
Details

Description Laurence 'GreenReaper' Parry 2009-05-12 14:28:03 UTC
If I make a redirect, like the following:

#REDIRECT [[Sophie Cabra]]
[[Category:Elephant characters]]

and then click preview, the category bar is not shown at the bottom of the preview.

Conversely, if I write the following:

[[Category:Elephant characters]]
#REDIRECT [[Sophie Cabra]]

the category bar is shown in the prieview.

If I save the page and view the redirect page, the category bar is shown in either case.

It seems like processing of the preview ends at the redirect. This gives a misleading view of the categories that the redirect will be in, and may mislead people into thinking that a redirect cannot be  in a category. If the order does not matter in the saved page, it should not matter in the preview either.
Comment 1 Chad H. 2009-05-14 23:53:06 UTC
Cf bug 14323
Comment 2 Brad Jorsch 2012-02-03 21:40:05 UTC
Created attachment 9955 [details]
Patch to fix the bug

Just noticed this bug, hard to believe it's been around so long and no one fixed it.

The fix is simple: we have to run the text through the parser and give the parser output to $wgOut->addParserOutputNoText() in order to get the template links, categories, and such updated.

The attached patch is mostly fixing the indentation after moving most of the junk in the "else" branch to outside of the if.
Comment 3 Mark A. Hershberger 2012-02-10 19:47:11 UTC
r111193

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links