Page MenuHomePhabricator

Math extension not usable without RESTbase server
Open, Needs TriagePublic


I've just updated to the latest stable MediaWiki version and updated the Math extension too as the old one would not run without errors due to changes in MediaWiki.

With the new version of the Math extension however, I am not able to use my locally hosted mathoid server anymore, it results in the following exception being thrown when trying to save a page with a math formula:

MediaWiki internal error.

Original exception: [3a4d87dd2fc75d713fb09b93] /XiphWiki:Sandbox MWException from line 214 of /var/www/html/extensions/Math/MathRestbaseInterface.php: Math extension can not find Restbase URL. Please specify $wgMathFullRestbaseURL.
#0 /var/www/html/extensions/Math/MathRestbaseInterface.php(356): MathRestbaseInterface->getUrl(string)
#1 /var/www/html/extensions/Math/MathRestbaseInterface.php(149): MathRestbaseInterface->getCheckRequest()
#2 /var/www/html/extensions/Math/Math.hooks.php(384): MathRestbaseInterface::batchEvaluate(array)
#3 [internal function]: MathHooks::onParserAfterTidy(Parser, string)
#4 /var/www/html/includes/Hooks.php(177): call_user_func_array(string, array)
#5 /var/www/html/includes/Hooks.php(205): Hooks::callHook(string, string, array, NULL)
#6 /var/www/html/includes/parser/Parser.php(1412): Hooks::run(string, array)
#7 /var/www/html/includes/parser/Parser.php(454): Parser->internalParseHalfParsed(string, boolean, boolean)
#8 /var/www/html/includes/content/WikitextContent.php(329): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#9 /var/www/html/includes/content/AbstractContent.php(516): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)
#10 /var/www/html/includes/poolcounter/PoolWorkArticleView.php(145): AbstractContent->getParserOutput(Title, integer, ParserOptions)
#11 /var/www/html/includes/poolcounter/PoolCounterWork.php(123): PoolWorkArticleView->doWork()
#12 /var/www/html/includes/page/Article.php(585): PoolCounterWork->execute()
#13 /var/www/html/includes/actions/ViewAction.php(68): Article->view()
#14 /var/www/html/includes/MediaWiki.php(499): ViewAction->show()
#15 /var/www/html/includes/MediaWiki.php(293): MediaWiki->performAction(Article, Title)
#16 /var/www/html/includes/MediaWiki.php(851): MediaWiki->performRequest()
#17 /var/www/html/includes/MediaWiki.php(523): MediaWiki->main()
#18 /var/www/html/index.php(43): MediaWiki->run()
#19 {main}

Event Timeline

ePirat created this task.Apr 17 2018, 11:18 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 17 2018, 11:18 AM

@ePirat thank you very much for your bug report. Can you specify, what exactly the latest stable version is, since there are many releases ?
Before I can help I need to know if our version release include the commits mentioned here T188745.

ePirat added a comment.EditedApr 17 2018, 11:34 AM

According to the Version page, it is 3.0.0 (e13d2d5) and MediaWiki 1.30.0

I am using mathoid running on the machine locally, having the math extension connect to localhost, not with the CLI script explained in T188745. If you want, I could try that though.

ePirat updated the task description. (Show Details)Apr 17 2018, 11:40 AM

I just realized I attached the wrong trace (from an older version that I tried to see if it would solve the issue), I've updated the initial description to contain the correct trace now. Sorry for that!

@ePirat Thank you. The simplest solution is, if you upgrade both (core and Math) to the latest WMF release, i.e. 1.31.0-wmf.30 . That way you don't even need to run your own mathoid server.

I do want to use my own mathoid server though, if possible. Would this work with 1.31.0-wmf.30?

@ePirat I have tested that in CLI mode recently. The advantage of this is that the rendering results are cached in the database. Thus if you customize the mathoid server, you might want to purge the caches, by truncating the mathoid table in the database. Of course adding action=purge works as well on a page by page basis.

Ok, I guess I will give it a try. I expect it would not cause problems when I later update from 1.31.0-wmf.30 to a non-wmf release? Where do I get the math extension for 1.31.0-wmf.30, directly from git?

@ePirat Which problems do you expect? You can get all the versions from git.

I will just wait for the official 1.31 release, it is too complex to update to 1.31 as I fear it breaks other extensions, not something to risk on a production instance. I will just disable Mathml for now and only use PNGs.

Pkra moved this task from Incoming to MW Math Extension on the Math board.Dec 11 2018, 8:21 AM