Page MenuHomePhabricator

When using parsing API, Lingo Glossary terms in page content will break certain parameters
Closed, ResolvedPublic

Assigned To
Authored By
Msftwikipmey
Mar 24 2019, 11:26 PM
Referenced Files
F28459092: image.png
Mar 24 2019, 11:26 PM
F28459065: image.png
Mar 24 2019, 11:26 PM
F28459220: image.png
Mar 24 2019, 11:26 PM
F28459022: image.png
Mar 24 2019, 11:26 PM

Description

Some parameters supported by the parsing function of Action API (action=parse), including disabletoc, disableeditsection, wrapoutputclass and disablestylededuplication, won't work if the content being parsed contains a term that is defined in the site's Lingo Glossary extension. (For documentation on the parsing API and these parameters, see https://www.mediawiki.org/wiki/API:Parsing_wikitext)

For example, here is a page without any Glossary term:

image.png (214×544 px, 18 KB)

If we run this query:

https://example.com/api.php?action=parse&prop=text&page=example_page&section=1&disableeditsection=1

It will correctly return:

image.png (226×1 px, 31 KB)

However, if the page contained a Glossary term (In this case, "KPI")

image.png (201×427 px, 18 KB)

And we run the same query:

https://example.com/api.php?action=parse&prop=text&page=example_page&section=1&disableeditsection=1

Then the disableeditsection parameter won't work. Running the same query will return wikitext with edit section texts, which is not supposed to happen.

image.png (370×1 px, 86 KB)

Event Timeline

Foxtrott triaged this task as Medium priority.Apr 3 2019, 7:40 AM
Foxtrott moved this task from Backlog to Bugs-Normal Prio on the MediaWiki-extensions-Lingo board.

we have a fix locally, but I will have to wait until wikitech start accepting developer account creation before i can submit a patch.

Change 509611 had a related patch set uploaded (by Tam-edwin-microsoft; owner: Tam-edwin-microsoft):
[mediawiki/extensions/Lingo@master] Add support for transformation API parser options

https://gerrit.wikimedia.org/r/509611

Change 509611 merged by Foxtrott:
[mediawiki/extensions/Lingo@master] Add support for text transformation API parser options

https://gerrit.wikimedia.org/r/509611

@Msftwikipmey: The patch has been merged. Are there more things to do in this task? If not, please resolve this task by setting the status to "Resolved" via the Add Action...Change Status dropdown. Thanks!

@Aklapper You are right! Just did. Thanks for calling it out!