Page MenuHomePhabricator

Module error causes math tag to fail, displaying as strip marker
Closed, ResolvedPublicBUG REPORT

Description

Steps to Reproduce:
Put a math tag on a page. After it, add an invocation of a Scribunto module that returns an error.

Actual Results:
The math tag fails to display correctly, and is replaced with a strip marker: '"UNIQ--postMath-00000001-QINU"' for instance.

Expected Results:
The math tag should display correctly.

Discussion:
For instance, see this minimal example on the English Wiktionary, with a Lua-based template that throws an error for an incorrect parameter. This was reported in a Grease Pit discussion.

Here the math tag renders correctly when the module error is before and not after the math tag. When math tags are placed both before and after a module error, only the math tag before the module error displays incorrectly. When I add more math tags and module errors, it seems that the last module error on a page breaks all the math tags before it.

Event Timeline

Anomie added a subscriber: Anomie.

Not a Scribunto issue. You can also trigger it with wikitext such as

<math>\textstyle f</math>

<indicator></indicator>

Anything that winds up calling Message::parse() or the like during the parse of the page does the same.

CCicalese_WMF claimed this task.
CCicalese_WMF added a subscriber: CCicalese_WMF.

Marking as Resolved as it is in the Done column. Feel free to reopen if there is remaining work.

@CCicalese_WMF: Does that mean there is nothing to change in the Math extension?

CCicalese_WMF removed CCicalese_WMF as the assignee of this task.

@Aklapper You are correct. This should stay open for investigation in the Math extension. Untagging Platform Engineering, as there does not appear to be anything for us to do.

matmarex added a subscriber: matmarex.

Seems to have been fixed by https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Math/+/655884. I don't see the problem in the linked revisions any more, e.g. https://en.wiktionary.org/wiki/Special:Permalink/57866432: