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).

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.

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

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.

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.