Page MenuHomePhabricator

rvparse doesn’t seem to work with rvsection
Closed, ResolvedPublic


With some articles, rvparse and rvsection don’t seem to work together, e.g. 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.

Version: unspecified
Severity: major



Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:26 PM
bzimport set Reference to bz28897.

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