Page MenuHomePhabricator

MathJax rendering missing after saving edit with VisualEditor
Closed, ResolvedPublicBUG REPORT

Description

I'm using Ubuntu 24.04, Chrome and 1.46.0-wmf.18 (rMWc6afb97999a5) 15:05, 5. Mär. 2026 mit MathJax rendering.

Procedure:

Is:

  • In most time but not always the formulas will be rendered with native mathml. Maybe something like a reload is missing.

Should:

  • The formulas should be rendered with MathJax.

Event Timeline

Physikerwelt moved this task from Inbox to Needs clarification on the Math board.

Maybe we should find a way to make this reproducible?

Hello @Physikerwelt ,

today I get MathMl rendering after every saving a page.

@Esanders Do you think it could be possible that the extension js is not loaded?

I can reproduce this by changing my preferences to MathJax rendering, enabling the preview without reloading the page, then previewing the page twice. On first preview, the formula displays correctly, on second preview I only get MathML. I'm testing on this page.

If I run window.MathJax.startup.defaultReady(); in my JavaScript console, the math fixes itself. What I assume is the issue is that this line is only called upon loading the module (first preview) but not any other time. Do you think the correct patch would be to change that line to mw.hook( 'wikipage.content' ).add( window.MathJax.startup.defaultReady );?

I believe T422077: MathJax missing from DiscussionTools reply preview is a duplicate of this bug, because DiscussionTools is essentially previewing the page multiple times, leading to this issue.

Krinkle renamed this task from Mathjax rendering after editing with Visual Editor does not work to MathJax rendering missing after saving edit with VisualEditor.Jul 15 2026, 11:45 AM

Change #1325581 had a related patch set uploaded (by Krinkle; author: Krinkle):

[mediawiki/extensions/Math@master] ext.math.mathjax: Call MathJax.typeset() from `wikipage.content` hook

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

Change #1325581 merged by jenkins-bot:

[mediawiki/extensions/Math@master] ext.math.mathjax: Call MathJax.typeset() from `wikipage.content` hook

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

Change #1326896 had a related patch set uploaded (by Krinkle; author: Krinkle):

[mediawiki/extensions/Math@wmf/1.47.0-wmf.16] ext.math.mathjax: Call MathJax.typeset() from `wikipage.content` hook

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

Change #1326897 had a related patch set uploaded (by Krinkle; author: Krinkle):

[mediawiki/extensions/Math@wmf/1.47.0-wmf.15] ext.math.mathjax: Call MathJax.typeset() from `wikipage.content` hook

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

Change #1326896 merged by jenkins-bot:

[mediawiki/extensions/Math@wmf/1.47.0-wmf.16] ext.math.mathjax: Call MathJax.typeset() from `wikipage.content` hook

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

Change #1326897 merged by jenkins-bot:

[mediawiki/extensions/Math@wmf/1.47.0-wmf.15] ext.math.mathjax: Call MathJax.typeset() from `wikipage.content` hook

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

Mentioned in SAL (#wikimedia-operations) [2026-08-18T20:48:29Z] <krinkle@deploy1003> Started scap sync-world: Backport for [[gerrit:1326896|ext.math.mathjax: Call MathJax.typeset() from wikipage.content hook (T434469 T419356 T422077)]], [[gerrit:1326897|ext.math.mathjax: Call MathJax.typeset() from wikipage.content hook (T434469 T419356 T422077)]]

Mentioned in SAL (#wikimedia-operations) [2026-08-18T20:50:32Z] <krinkle@deploy1003> krinkle: Backport for [[gerrit:1326896|ext.math.mathjax: Call MathJax.typeset() from wikipage.content hook (T434469 T419356 T422077)]], [[gerrit:1326897|ext.math.mathjax: Call MathJax.typeset() from wikipage.content hook (T434469 T419356 T422077)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-08-18T21:02:25Z] <krinkle@deploy1003> Finished scap sync-world: Backport for [[gerrit:1326896|ext.math.mathjax: Call MathJax.typeset() from wikipage.content hook (T434469 T419356 T422077)]], [[gerrit:1326897|ext.math.mathjax: Call MathJax.typeset() from wikipage.content hook (T434469 T419356 T422077)]] (duration: 13m 56s)