Page MenuHomePhabricator

native: Check debug console on Help:MathTestNative
Closed, ResolvedPublic

Description

Firefox reports several parse errors in the mathml in

https://en.wikipedia.beta.wmflabs.org/wiki/Help:MathTestNative

Error in parsing the value '' for 'columnspacing' attribute of <mtable/>.  Attribute ignored.Invalid markup: Incorrect number of children for <munder/> tag. Help:MathTestNative
Invalid markup: Incorrect number of children for <msup/> tag. Help:MathTestNative
Invalid markup: Incorrect number of children for <munder/> tag. Help:MathTestNative
Invalid markup: Incorrect number of children for <msup/> tag. Help:MathTestNative
Invalid markup: Incorrect number of children for <munder/> tag. node.js:370:30
Invalid markup: Incorrect number of children for <msup/> tag. node.js:370:30
Invalid markup: Incorrect number of children for <munder/> tag. node.js:370:30
Invalid markup: Incorrect number of children for <msup/> tag. node.js:370:30
Invalid markup: Incorrect number of children for <munder/> tag. utils.js:166:21

A typical cause of the incorrect child count is empty tex groups.

For example the slightly nonsensical example

\underset{\mathrm{def}}{}

on the page is producing an <munder> with just one child. The mathml could be simplified simply removing the munder (corresponding to correcting the tex to \mathrm{def} without the spurious \underset) or if you want to model the tex exactly you need an empty <mrow/> (or <mi/> to match the empty tex argument so that <munder> has two children.

Event Timeline

The number of errors is reduced

Invalid markup: Incorrect number of children for <msub/> tag. Help:MathTestNative
Invalid markup: Incorrect number of children for <msub/> tag. Help:MathTestNative
Invalid markup: Incorrect number of children for <msub/> tag. 2 layout.js:317:44

At least one of the cases is related to a bug in muder / mover, already fixed in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Math/+/993233. Let's recheck once the change is merged.

Also there is one warning “mathvariant='double-struck'” on MathML elements is deprecated and will be removed at a future date. which can be a problem for chrome rendering.

And one more message

Support for rendering stretched MathML operators with STIXGeneral fonts is deprecated and may be removed at a future date. For details about newer fonts that will continue to be supported, see https://developer.mozilla.org/docs/Mozilla/MathML_Project/Fonts

Not sure where this comes from

Only one issue is left

Invalid markup: Incorrect number of children for <msub/> tag.
Physikerwelt claimed this task.

Now only warning about deprecated elements and entirely unrelated cookie problems remain:

Some cookies are misusing the recommended “SameSite“ attribute 25
“mathvariant='fraktur'” on MathML elements is deprecated and will be removed at a future date. Help:MathTestNative
Support for rendering stretched MathML operators with STIXGeneral fonts is deprecated and may be removed at a future date. For details about newer fonts that will continue to be supported, see https://developer.mozilla.org/docs/Mozilla/MathML_Project/Fonts