Page MenuHomePhabricator

first page is not transcluded if fromsection is present but empty
Closed, InvalidPublic

Description

Since 3/3/2016, transclusion is broken when using the following syntax:

<pages index="some_file.djvu" from="1" to="10" fromsection= tosection= />

The first page (1 in this example) is not transcluded. However if you remove fromsection= and tosection=, or alternatively if you change them to fromsection="" tosection="" (with quotes), then transclusion work correctly.

Event Timeline

Tpt subscribed.

This is not a bug with ProofreadPage but a change in the MediaWiki parser (see task T108134) that changed how parameter without value (like fromsection=) are parsed:

Before <pages index="some_file.djvu" from="1" to="10" fromsection= tosection= /> was interpreted as <pages index="some_file.djvu" from="1" to="10" fromsection="" tosection="" /> and so, no section filter was applied to the first page and now <pages index="some_file.djvu" from="1" to="10" fromsection= tosection= /> is seen as <pages index="some_file.djvu" from="1" to="10" fromsection="tosection=" /> (like in HTML 5) and, so, ProofreadPage only extracts the section "tosection=" from the first page.

Yes, but while the change in itself is correct, it has broken all the pages using the old syntax!
So either this change is reverted, or a bot should be run on all subdomains to change all pages to the new syntax.

Yes, it's sad. But you should report it in bug T108134 or open a new one related to the mediawiki-parser product. ProofreadPage can't do anything about it. Phe runned a bot on fr.wikisource to fix these error, you could maybe ask him to run it on it.wikisource.

Are we able to identify those who worked on the mediawiki-parser product and add them to this bug so that they can assist with its resolution. Cooperation would be a marvellous thing where other upgrades cause unexpected consequences in extensions.