Page MenuHomePhabricator

API: rvsection= doesn't work for included sections like "T-2"
Closed, ResolvedPublic

Description

Included sections get the prefix "T-" so the parser knows it has only to consider the actually included part of a page (sections within <noinclude>...</noinclude>) are ignored). However, if you pass a section number like T-2 to the api with prop=revisions&rvprop=content&rvsection=T-2 , you'll always get the first section, probably because section numbers are validated as integers by the api.


Version: 1.14.x
Severity: minor
URL: http://en.wikipedia.org/w/api.php?action=query&titles=Wikipedia:Village_pump_(technical)&prop=revisions&rvprop=content&rvsection=T-2

Details

Reference
bz16516

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:26 PM
bzimport set Reference to bz16516.

(In reply to comment #0)

Included sections get the prefix "T-" so the parser knows it has only to
consider the actually included part of a page (sections within
<noinclude>...</noinclude>) are ignored). However, if you pass a section number
like T-2 to the api with prop=revisions&rvprop=content&rvsection=T-2 , you'll
always get the first section,

Fixed in r44181.

probably because section numbers are validated as
integers by the api.

Exactly. Changing rvsection to a string parameter solved the bug.