Last modified: 2007-09-26 16:12:40 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 11353 - api.php should be able to load only a section of wikitext of a page
api.php should be able to load only a section of wikitext of a page
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-15 19:18 UTC by italvet
Modified: 2007-09-26 16:12 UTC (History)
1 user (show)

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


Attachments

Description italvet 2007-09-15 19:18:47 UTC
hello,

it should be very useful that api.php can load only a section of wikitext like index.php can do : 

index.php?title=titleOfThePage&action=edit&section=nSection

something like

action=query&prop=revisions&rvprop=content&titles=wgTitle&section=nSection ?
Comment 1 Daniel Cannon (AmiDaniel) 2007-09-20 20:20:27 UTC
This could be quite problematic when loading content from a page's revisions over time. In particular, section numbers are determined based upon the placement of the sections within the current revision. In previous revisions, the section referred to may not exist or there may have been other sections previous to it that would effect the numbering of the section. For one revision, this should be do-able; however, I think it's best implemented not as a feature of the API but rather as a function of "action=raw". For instance, http://en.wikipedia.org/w/index.php?title=Chad&action=raw&section=1 (which doesn't work at the moment) could provide you with the contents of the "History" section.
Comment 2 Daniel Cannon (AmiDaniel) 2007-09-26 05:24:50 UTC
Committed r26142 which enables the retrieval of the raw content of a section of a page via action=raw; e.g. http://en.wikipedia.org/w/index.php?title=Chad&action=raw&section=1 now works. I think this should suffice.
Comment 3 italvet 2007-09-26 16:12:40 UTC
the raw fits my need perfectly (absolutely nothing to strip above all) so it's even better than i expected with api.php, thanks.(In reply to comment #2)
> Committed r26142 which enables the retrieval of the raw content of a section of
> a page via action=raw; e.g.
> http://en.wikipedia.org/w/index.php?title=Chad&action=raw&section=1 now works.
> I think this should suffice.


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


Navigation
Links