Page MenuHomePhabricator

prop=info&inprop=preload does not return text
Closed, ResolvedPublic

Description

On en wikisource it was possible to preload text via API for not existing pages in Page: ns, when corresponding Index/underlying file had a text layer. Now None is returned instead.

E.g. http://en.wikisource.org/w/api.php?action=query&titles=Page:More%20Tales%20from%20Tolstoi.djvu/268&prop=info&inprop=preload returns 'preload': None

See instead https://en.wikisource.org/w/index.php?title=Page:More_Tales_from_Tolstoi.djvu/268&action=edit


Version: unspecified
Severity: normal

Details

Reference
bz58963

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:26 AM
bzimport added a project: ProofreadPage.
bzimport set Reference to bz58963.
bzimport added a subscriber: Unknown Object (MLST).
Mpaa created this task.Dec 25 2013, 5:38 PM

This is not a bug in the API. inprop=preload returns the text that is preloaded into the standard MediaWiki edit form. In Gerrit change 72933, ProofreadPage changed from using the standard MediaWiki edit form to using a custom edit form.

Whether the ProofreadPage maintainers want to resurrect their EditPagePreloadText hook function, or WONTFIX this, or do something completely different is up to them.

Tpt added a comment.Dec 26 2013, 5:00 PM

Thanks for the bug report. Have you an important need for this feature? If yes, I'll try to reimplement it.

Mpaa added a comment.Dec 26 2013, 6:45 PM

This is a very convenient way to load the text layer of an index into a file using Pywikipediabot and its API calls. In this way, the text layer is already matched with Page numbers, etc. and available for post processing purposes and page uploads.
An alternative is to scrape the HTML text, after faking the creation of a page, but it is much slower (and I guess it also loads the server more).

If it is not too much of a problem for your code, I would really appreciate if you could keep this. Thanks.

Tpt added a comment.Mar 11 2014, 7:33 AM

I've made a fix some weeks ago that is now deployed (see change Ic68d9be120d23386cb0e95849a850ae6eada0e64) and I've forgotten to close the bug. See https://en.wikisource.org/w/api.php?action=query&titles=Page:More%20Tales%20from%20Tolstoi.djvu/54&prop=info&inprop=preload as example.

GOIII moved this task from Backlog to Done on the ProofreadPage board.Jun 12 2016, 3:55 AM