[Mediawiki-l] StableVersions bugs
John Moorhouse
john.moorhouse at 3jays.me.uk
Thu Feb 1 22:35:34 UTC 2007
Lane, Ryan wrote:
>
> And look at what is being sent, an object. This doesn't look correct at
> all. Try calling replaceVariables without $parserOptions. If you need to
> set the parserOptions, try setting it ahead of time by doing:
>
> $p->mOptions = $parserOptions;
>
>
Tried running with the changes both with & without the
$p->mOptions = $parserOptions;
but still getting the same error.
Ta
John
Edited getCacheText:-
function getCacheText( &$article ) {
global $wgStableVersionCaching, $wgUser;
$title = $article->getTitle();
$article->loadContent( true ); # FIXME: Do we need the
"true" here? For what? Safe redirects??
$text = $article->mContent;
$p = new Parser();
$p->disableCache();
$wgStableVersionCaching = true;
$parserOptions = ParserOptions::newFromUser( $wgUser ); # Dummy
$text = $p->parse( $text, $title, $parserOptions );
$stripState = $p->mStripState;
$wgStableVersionCaching = false;
$p->mOptions = $parserOptions;
$text = $p->replaceVariables( $text );
$this->fixNoWiki( $stripState );
$p->mStripState = $stripState;
$text = $p->unstrip( $text, $p->mStripState );
$text = $p->unstripNoWiki( $text, $p->mStripState );
return $text;
> V/r,
>
> Ryan Lane
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at lists.wikimedia.org
> http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
More information about the MediaWiki-l
mailing list