Page MenuHomePhabricator

iwpages does not transclude the first requested page
Closed, InvalidPublic

Description

When using Template:Iwpages to transclude a series of pages from one language Wikisource to another, the first requested page is missing from the content returned from the target Wikisource.

Examples:

A workaround is to add a section label to the first page in the series, and specify the from_section in the iwpages call, see https://en.wikisource.org/w/index.php?title=Flower-de-Luce_(Collection)/No%C3%ABl&diff=prev&oldid=7862377

I have traced the problem to the API call. For example, the API call for Lapsus Calami (linked above) includes a request for page 25, but does not receive the contents of page 25 in the result:

https://la.wikisource.org/w/api.php?format=json&requestid=la|Lapsus%20Calami%201st%20Ed.djvu|25|26||___0.9639988867423135&action=parse&callback=iw_pages_callback&text=%3Cpages%20index=%22Lapsus%20Calami%201st%20Ed.djvu%22%20from=25%20to=26%20fromsection=%20tosection=%20/%3E%3Creferences/%3E&title=Lapsus%20Calami%201st%20Ed.djvu

/**/iw_pages_callback({"requestid":"la|Lapsus Calami 1st Ed.djvu|25|26||___0.9639988867423135","parse":{"title":"Lapsus Calami 1st Ed.djvu","pageid":0,"text":{"*":"<div class=\"mw-parser-output\"><div class=\"prp-pages-output\">\n<span><span class=\"pagenum\" id=\"13\" title=\"Pagina:Lapsus Calami 1st Ed.djvu/25\"></span></span>&#32;<span><span class=\"pagenum\" id=\"14\" title=\"Pagina:Lapsus Calami 1st Ed.djvu/26\"></span></span><div class=\"poem\">\n<p>Floreat Praepositus,<br />\n<span class=\"mw-poem-indented\" style=\"display: inline-block; margin-left: 1em;\">Maximus Augustus!</span><br />\nFloreant Bursarii,<br />\nAusten Leighi varii,<br />\n<span class=\"mw-poem-indented\" style=\"display: inline-block; margin-left: 1em;\">Fredericus Justus!</span><br />\n<br />\nAequam servent animam<br />\n<span class=\"mw-poem-indented\" style=\"display: inline-block; margin-left: 1em;\">Arduis decani:</span><br />\nTu Etona floreas!<br />\nFloreant Collegeri!<br />\n<span class=\"mw-poem-indented\" style=\"display: inline-block; margin-left: 1em;\">Vivant Oppidani!</span><br />\n<br />\nVivat J. K. Stephanus,<br />\n<span class=\"mw-poem-indented\" style=\"display: inline-block; margin-left: 1em;\">Humilis poeta!</span><br />\nVivat Monty Jamesius,<br />\nVivant A, B, C, D, E<br />\n<span class=\"mw-poem-indented\" style=\"display: inline-block; margin-left: 1em;\">Et totus Alphabeta!</span>\n</p>\n</div>\n|}</div><p>&#32;\n</p>\n<!-- \nNewPP limit report\nParsed by mw1340\nCached time: 20191008150032\nCache expiry: 2592000\nDynamic content: false\nComplications: []\nCPU time usage: 0.044 seconds\nReal time usage: 0.061 seconds\nPreprocessor visited node count: 48/1000000\nPreprocessor generated node count: 0/1500000\nPost\u2010expand include size: 212/2097152 bytes\nTemplate argument size: 74/2097152 bytes\nHighest expansion depth: 4/40\nExpensive parser function count: 0/500\nUnstrip recursion depth: 2/20\nUnstrip post\u2010expand size: 1629/5000000 bytes\nNumber of Wikibase entities loaded: 0/400\n-->\n<!--\nTransclusion expansion time report (%,ms,calls,template)\n100.00% 14.582 1 -total\n 53.00% 7.728 1 Pagina:Lapsus_Calami_1st_Ed.djvu/26\n 18.58% 2.709 2 MediaWiki:Proofreadpage_pagenum_template\n 16.56% 2.415 1 Formula:Block_center/e\n-->\n</div>"},"langlinks":[],"categories":[],"links":[],"templates":[{"ns":106,"exists":"","*":"Liber:Lapsus Calami 1st Ed.djvu"},{"ns":8,"exists":"","*":"MediaWiki:Proofreadpage pagenum template"},{"ns":104,"exists":"","*":"Pagina:Lapsus Calami 1st Ed.djvu/25"},{"ns":104,"exists":"","*":"Pagina:Lapsus Calami 1st Ed.djvu/26"},{"ns":10,"exists":"","*":"Formula:Block center/e"}],"images":[],"externallinks":[],"sections":[],"parsewarnings":[],"displaytitle":"Lapsus Calami 1st Ed.djvu","iwlinks":[],"properties":[]}})

Event Timeline

beleg_tal created this task.Tue, Oct 8, 3:19 PM
Restricted Application added subscribers: Liuxinyu970226, Aklapper. · View Herald TranscriptTue, Oct 8, 3:19 PM

(Removing wikisource-api, see its description)

@beleg_tal: Is this a general problem affecting all Wikisources?

@Aklapper Having just tested it, it appears to only happen when transcluding content into English Wikisource.

beleg_tal added a comment.EditedFri, Oct 11, 2:57 PM

The API call from frWS to laWS is as follows, for comparison to the above call from enWS to laWS:

https://la.wikisource.org/w/api.php?format=json&title=Lapsus%20Calami%201st%20Ed.djvu&requestid=la|Lapsus%20Calami%201st%20Ed.djvu|25|26||___0.02139824631152254&action=parse&callback=iw_pages_callback&text=%3Cpages%20index=%22Lapsus%20Calami%201st%20Ed.djvu%22%20from=%2225%22%20to=%2226%22%20tosection=%20/%3E%3Creferences/%3E

/**/iw_pages_callback({"requestid":"la|Lapsus Calami 1st Ed.djvu|25|26||___0.02139824631152254","parse":{"title":"Lapsus Calami 1st Ed.djvu","pageid":0,"text":{"*":"<div class=\"mw-parser-output\"><div class=\"prp-pages-output\">\n<span><span class=\"pagenum\" id=\"13\" title=\"Pagina:Lapsus Calami 1st Ed.djvu/25\"></span></span><div class=\"centertext\" style=\"margin-left:0pt; text-align:center; width:100%;\">\n<p><span style=\"font-variant:small-caps;\">Coll. Regal.</span>\n</p><p><br />\n</p>\n(Air: <i>Gaudeamus igitur</i>.)</div>\n<div style=\"margin-right:auto; margin-left:auto; text-align:center; width:100%;\">\n<table class=\"blockcenterStart\" style=\"background:inherit; display:inline-table; text-align:left;\">\n\n\n<tbody><tr>\n<td>\n<div class=\"poem\">\n<p>Gaudeamus igitur<br />\n<span class=\"mw-poem-indented\" style=\"display: inline-block; margin-left: 1em;\">Juvenes dum sumus:</span><br />\nPost jucundam juventutem,<br />\nPost molestam senectutem,<br />\n<span class=\"mw-poem-indented\" style=\"display: inline-block; margin-left: 1em;\">Nos habebit humus.</span><br />\n<br />\nVivat Academia!<br />\n<span class=\"mw-poem-indented\" style=\"display: inline-block; margin-left: 1em;\">Vivant Professores!</span><br />\nVivat membrum quodlibet!<br />\nVivant membra quaelibet!<br />\n<span class=\"mw-poem-indented\" style=\"display: inline-block; margin-left: 1em;\">Semper sint in flore!</span><br />\n<br />\nFloreat Collegium<br />\n<span class=\"mw-poem-indented\" style=\"display: inline-block; margin-left: 1em;\">Quod audit Regale!</span><br />\nVivat Oscar Browningus!<br />\nVivat Georgius Prothero!<br />\n<span class=\"mw-poem-indented\" style=\"display: inline-block; margin-left: 1em;\">Et Arturus Tilley!</span><br />\n<br />\n</p>\n</div>&#32;<span><span class=\"pagenum\" id=\"14\" title=\"Pagina:Lapsus Calami 1st Ed.djvu/26\"></span></span><div class=\"poem\">\n<p>Floreat Praepositus,<br />\n<span class=\"mw-poem-indented\" style=\"display: inline-block; margin-left: 1em;\">Maximus Augustus!</span><br />\nFloreant Bursarii,<br />\nAusten Leighi varii,<br />\n<span class=\"mw-poem-indented\" style=\"display: inline-block; margin-left: 1em;\">Fredericus Justus!</span><br />\n<br />\nAequam servent animam<br />\n<span class=\"mw-poem-indented\" style=\"display: inline-block; margin-left: 1em;\">Arduis decani:</span><br />\nTu Etona floreas!<br />\nFloreant Collegeri!<br />\n<span class=\"mw-poem-indented\" style=\"display: inline-block; margin-left: 1em;\">Vivant Oppidani!</span><br />\n<br />\nVivat J. K. Stephanus,<br />\n<span class=\"mw-poem-indented\" style=\"display: inline-block; margin-left: 1em;\">Humilis poeta!</span><br />\nVivat Monty Jamesius,<br />\nVivant A, B, C, D, E<br />\n<span class=\"mw-poem-indented\" style=\"display: inline-block; margin-left: 1em;\">Et totus Alphabeta!</span>\n</p>\n</div>\n</td></tr></tbody></table></div>&#32;\n</div>\n<!-- \nNewPP limit report\nParsed by mw1234\nCached time: 20191011145618\nCache expiry: 2592000\nDynamic content: false\nComplications: []\nCPU time usage: 0.032 seconds\nReal time usage: 0.056 seconds\nPreprocessor visited node count: 92/1000000\nPreprocessor generated node count: 0/1500000\nPost\u2010expand include size: 1115/2097152 bytes\nTemplate argument size: 264/2097152 bytes\nHighest expansion depth: 8/40\nExpensive parser function count: 0/500\nUnstrip recursion depth: 2/20\nUnstrip post\u2010expand size: 3471/5000000 bytes\nNumber of Wikibase entities loaded: 0/400\n-->\n<!--\nTransclusion expansion time report (%,ms,calls,template)\n100.00% 27.126 1 -total\n 58.79% 15.948 1 Pagina:Lapsus_Calami_1st_Ed.djvu/25\n 24.25% 6.577 1 Formula:Center\n 12.15% 3.295 2 MediaWiki:Proofreadpage_pagenum_template\n 11.20% 3.037 1 Formula:Block_center/s\n 10.79% 2.926 1 Formula:Sc\n 8.57% 2.324 1 Formula:Block_center/e\n-->\n</div>"},"langlinks":[],"categories":[],"links":[],"templates":[{"ns":106,"exists":"","*":"Liber:Lapsus Calami 1st Ed.djvu"},{"ns":8,"exists":"","*":"MediaWiki:Proofreadpage pagenum template"},{"ns":104,"exists":"","*":"Pagina:Lapsus Calami 1st Ed.djvu/25"},{"ns":104,"exists":"","*":"Pagina:Lapsus Calami 1st Ed.djvu/26"},{"ns":10,"exists":"","*":"Formula:Center"},{"ns":10,"exists":"","*":"Formula:Sc"},{"ns":10,"exists":"","*":"Formula:Block center/s"},{"ns":10,"exists":"","*":"Formula:Block center/e"}],"images":[],"externallinks":[],"sections":[],"parsewarnings":[],"displaytitle":"Lapsus Calami 1st Ed.djvu","iwlinks":[],"properties":[]}})

beleg_tal added a comment.EditedFri, Oct 11, 3:19 PM

OK, I guess the problem is that the changes for T188202 were implemented on mulWS but not copied to enWS. We'll need to update enWS.

Discussion opened locally : https://en.wikisource.org/wiki/Wikisource:Scriptorium#MediaWiki:InterWikiTransclusion.js

Aklapper closed this task as Invalid.Fri, Oct 11, 4:23 PM

Ah, glad you found the reason for this! Closing this task as invalid as this is out of scope and local wiki content.

Restricted Application removed a subscriber: Liuxinyu970226. · View Herald TranscriptFri, Oct 11, 4:23 PM