Last modified: 2012-02-10 19:52:01 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.
Cf bug 14323
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.
r111193