Thread:Project:Support desk/Error Page is not parsing wikitext in System Message/reply

Fixed it. As mentioned above (in extended content), the line that actually outputs the error is: $wgOut->showErrorPage( $title, $msg, $params );

When examining OutputPage::show:ErrorPage, you find: $this->addHTML( call_user_func_array( 'wfMsgExt', $params ) );

addHTML doesn't parse wikitext. addWikiText does. I couldn't figure out a way to avoid editing SpecialEmailUser.php to avoid this, so I made the following modifications to core files.

I added the following as a new function to OutputPage.php. /** Added by Ed Wunch for SpecialEmailUser.php */ public function showErrorPageWiki( $title, $msg, $params = array ) { if ( $this->getTitle ) { $this->mDebugtext .= 'Original title: '. $this->getTitle->getPrefixedText. "\n"; }               $this->setPageTitle( wfMsg( $title ) ); $this->setHTMLTitle( wfMsg( 'errorpagetitle' ) ); $this->setRobotPolicy( 'noindex,nofollow' ); $this->setArticleRelated( false ); $this->enableClientCache( false ); $this->mRedirect = ''; $this->mBodytext = '';

array_unshift( $params, 'parse' ); array_unshift( $params, $msg ); $this->addWikiText( call_user_func_array( 'wfMsgExt', $params ) );

$this->returnToMain; }

I then modified the calling line in SpecialEmailUser.php. $wgOut->showErrorPageWiki( $title, $msg, $params );

Again, this is the lazy man's version. I'm sure that if I spent some time on it, I could've avoided modifying OutputPage.php, and put the function above in an extension file, and called on global $wgOut, and just replaced all instances of $this above with $wgOut. Still, I don't know how to avoid that calling line showErrorPage which calls the bad function.

Anyway, hope this helps!