Last modified: 2012-04-16 09:15:58 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T30897, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28897 - rvparse doesn’t seem to work with rvsection
rvparse doesn’t seem to work with rvsection
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Low major (vote)
: ---
Assigned To: Roan Kattouw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-09 18:08 UTC by Giftpflanze
Modified: 2012-04-16 09:15 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Giftpflanze 2011-05-09 18:08:25 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.
Comment 1 Bawolff (Brian Wolff) 2011-05-11 22:17:19 UTC
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.
Comment 2 Sam Reed (reedy) 2011-06-05 16:15:49 UTC
			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
Comment 3 Sam Reed (reedy) 2011-06-05 16:34:52 UTC
r89507

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links