Page MenuHomePhabricator

Consider using canonical parser options for Content::getParserOutput()
Closed, ResolvedPublic

Description

IAlex wrote in a comment to I3b2dad3a:

From the use cases I see, this is wrong, since constructing a ParserOptions 
object without any parameter will use $wgUser and $wgLang. This will cause the 
result to be user-dependant when executing links update (i.e. regression of  
bug 14404 and maybe others too). I would suggest to use something like:

$wikiPage = WikiPage::factory( $title );

$options = $wikiPage->makeParserOptions( 'canonical' );

This needs some investigation to make sure we do the right thing for every context this function is used in. Note also interactions with the parser cache, especially wrt the parser cache key.


Version: unspecified
Severity: normal

Details

Reference
bz40653

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 12:52 AM
bzimport set Reference to bz40653.
bzimport added a subscriber: Unknown Object (MLST).

Closed older resolved bugs as verified.