Page MenuHomePhabricator

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

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:

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:

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

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.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 24 2019, 11:26 PM
Msftwikipmey updated the task description. (Show Details)
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!

Msftwikipmey closed this task as Resolved.Jul 22 2019, 5:19 PM

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