Last modified: 2012-04-16 09:15:58 UTC
With some articles, rvparse and rvsection don’t seem to work together, e.g. http://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=Iron%20Maiden&rvprop=content&rvsection=0&rvparse&format=yamlfm. All page content is returned. Without rvparse it works but that’s not what is desired. Workaround is action=parse, but that could be too limited.
Looks as if the option was programmed to only apply to the content returned, not when the content is parsed. I agree that's confusing and should probably be changed.
if ( $this->parseContent ) { $articleObj = new Article( $title ); $p_result = $articleObj->getParserOutput(); $text = $p_result->getText(); } That overrides the section text already pulled in if ( $this->section !== false ) { $text = $wgParser->getSection( $text, $this->section, false ); if ( $text === false ) { $this->dieUsage( "There is no section {$this->section} in r" . $revision->getId(), 'nosuchsection' ); } } I think this has never actually worked since introduction in r75266
r89507