The following error is displayed instead of the rendered formula:
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle x = 123}
Occasionally, a formula is rendered successfully. But once I modify the formula (for example in VisualEditor), this error occurs again.
I am on MediaWiki 1.35.0, freshly installed as a Bitnami VM application on my local machine. The only extensions I have are VisualEditor 0.1.2 and Math 3.0.0 (b5a8f57).
Special:MathStatus
The following error is shown on the Special:MathStatus page (the hash changes when I refresh the page):
[77976fdf607ace02e33b7313] /wiki/Special:MathStatus MWException from line 109 of /bitnami/mediawiki/extensions/Math/src/MathRestbaseInterface.php: TeX input is invalid. Backtrace: #0 /bitnami/mediawiki/extensions/Math/src/MathRestbaseInterface.php(426): MathRestbaseInterface->calculateHash() #1 /bitnami/mediawiki/extensions/Math/src/MathRestbaseInterface.php(100): MathRestbaseInterface->getContentRequest(string) #2 /bitnami/mediawiki/extensions/Math/src/MathRestbaseInterface.php(232): MathRestbaseInterface->getContent(string) #3 /bitnami/mediawiki/extensions/Math/src/MathRenderer.php(685): MathRestbaseInterface->getSvg() #4 /bitnami/mediawiki/extensions/Math/src/MathMathML.php(405): MathRenderer->getSvg() #5 /bitnami/mediawiki/extensions/Math/src/MathMathML.php(446): MathMathML->correctSvgStyle(NULL) #6 /bitnami/mediawiki/extensions/Math/src/MathMathML.php(525): MathMathML->getFallbackImage() #7 /bitnami/mediawiki/extensions/Math/src/SpecialMathStatus.php(69): MathMathML->getHtmlOutput() #8 /bitnami/mediawiki/extensions/Math/src/SpecialMathStatus.php(51): SpecialMathStatus->testSpecialCaseText() #9 /bitnami/mediawiki/extensions/Math/src/SpecialMathStatus.php(41): SpecialMathStatus->runMathMLTest(string) #10 /opt/bitnami/mediawiki/includes/specialpage/SpecialPage.php(600): SpecialMathStatus->execute(NULL) #11 /opt/bitnami/mediawiki/includes/specialpage/SpecialPageFactory.php(635): SpecialPage->run(NULL) #12 /opt/bitnami/mediawiki/includes/MediaWiki.php(307): MediaWiki\SpecialPage\SpecialPageFactory->executePath(Title, RequestContext) #13 /opt/bitnami/mediawiki/includes/MediaWiki.php(940): MediaWiki->performRequest() #14 /opt/bitnami/mediawiki/includes/MediaWiki.php(543): MediaWiki->main() #15 /opt/bitnami/mediawiki/index.php(53): MediaWiki->run() #16 /opt/bitnami/mediawiki/index.php(46): wfIndexMain() #17 {main}
Occasionally, the error does not occur, and instead I see a list of tests, with one failed test called Comparing the generated SVG with the reference.
What I've tried
- I disabled the firewall of my Mac (that is the host of the Bitnami VM), and tried setting $wgMathFullRestbaseURL= 'https://en.wikipedia.org/api/rest_' in LocalSettings.php. I also tried changing my Internet connection.
- I tried disabling the VisualEditor extension. I also tried restarting the Apache server and the entire Bitnami VM.
- I read this post but found the problem is already fixed in my version of MultiHttpClient.php.