Last modified: 2014-08-20 17:43:24 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T65915, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 63915 - [Regression] MathJax broken in 1.23wmf22 and master
[Regression] MathJax broken in 1.23wmf22 and master
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Math (Other open bugs)
master
All All
: High major with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 64097 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-14 21:46 UTC by Derk-Jan Hartman
Modified: 2014-08-20 17:43 UTC (History)
14 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Derk-Jan Hartman 2014-04-14 21:46:44 UTC
MathJax is not working in 1.23wmf22 and later, incl master.
1.23wmf22 is currently deployed to group0 and will be deployed to group1 and group2 on tuesday and thursday respectively.

The breakage can be witnessed here:
https://test.wikipedia.org/wiki/MathTextPage

and here:
http://en.wikipedia.beta.wmflabs.org/wiki/Help:Displaying_a_formula

Problems:
1: There seems to be a change in how the mathjax setting is kept, but users do not appear to get migrated into the new setting. This is bound to create community friction.
2: In PNG mode, the mathjax option doesn't seem to work at all
3: in Tex mode on betalabs I get:
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (MathMenu.js, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (MathZoom.js, line 0)

Suspected cause of breakage is Bug 57981, commit https://gerrit.wikimedia.org/r/#/c/110226/
Comment 1 physikerwelt 2014-04-15 06:16:46 UTC
thanks for bringing that up.
To the problems:
1) The new and the old setting are technically a completly different thing. I was thinkint that MathJax is an experimental option and only few people are using that. Would you vote for a migration script?

2) After adding action=purge to the page everything worked well.

3)seems to work for me as well.

Could you recheck please?
Comment 2 Derk-Jan Hartman 2014-04-15 12:08:07 UTC
1) if we can grandfather people in, then we should (if mathjax -> source + mathjax).
2) If we need to purge every page that contains math, then that seems problematic to me, or at the very least requiring coordination with ops. Is the problem that the module required is not in the page, or is that the required classes are not in the tag of the content ?
3) Still have those errors (Safari 7, labs only), which to mean indicates that something in the resource loader order is going wrong.
Comment 3 physikerwelt 2014-04-15 15:22:24 UTC
1) is there a template for such a maintenance script (that only needs to be run once)
2) that's a fundamental problem. if we change the program we also have to renew the caches. But I think it's one of last changes to the png rendering mode. Also it affects people that use png+mathjax only (currently nobody)
3) did this error occour before the change as well?
Comment 5 physikerwelt 2014-04-19 11:21:22 UTC
*** Bug 64097 has been marked as a duplicate of this bug. ***
Comment 6 Bartosz Dziewoński 2014-04-19 21:35:59 UTC
Also reported on <https://pl.wikipedia.org/wiki/WP:KT#math_raz_jeszcze>.
Comment 7 physikerwelt 2014-04-20 12:51:40 UTC
Any ideas for a maintenance script that updates the users settings?
Comment 8 Bartosz Dziewoński 2014-04-20 13:57:00 UTC
There is maintenance/userOptions.php, but it's rather limited.
Comment 9 physikerwelt 2014-04-21 06:47:42 UTC
3) With the help of user Salix alba I found out that
=== MathJax ===
renders as
<h3><span class="mw-headline" id="MathJax">MathJax</span></h3>

maybe mathjax does not like elements with id MathJax
Comment 10 physikerwelt 2014-04-21 09:22:24 UTC
(In reply to Bartosz Dziewoński from comment #8)
> There is maintenance/userOptions.php, but it's rather limited.
By adding
/** @var boolean $wgDefaultUserOptions['mathJax'] determines if client-side mathjax is enabled by default */
$wgDefaultUserOptions['mathJax'] = false;

the Option mathJax gets visible to the script.
With the script it would be possible to change the user options from mathjax to source. But not to enable the mathJax option
Comment 11 Gerrit Notification Bot 2014-04-21 09:30:15 UTC
Change 127607 had a related patch set uploaded by Physikerwelt:
Add default value for user option mathJax

https://gerrit.wikimedia.org/r/127607
Comment 12 Peter Krautzberger 2014-04-21 18:09:38 UTC
(In reply to physikerwelt from comment #9)
> 3) With the help of user Salix alba I found out that
> === MathJax ===
> renders as
> <h3><span class="mw-headline" id="MathJax">MathJax</span></h3>
> 
> maybe mathjax does not like elements with id MathJax

That shouldn't cause any problems for MathJax. MathJax uses MathJax-Element-N ids.
Comment 13 Eran Roz 2014-04-23 21:08:22 UTC
In Hebrew Wikipedia  there is a script for live preview of math equation in toolbar using MathJax, and after the last changes it doesn't work.

The first problem, which I can workaround is that MathJax ignores loading when user didn't allow MathJax in their preferences. [can be hacked by mw.user.options.set( 'mathJax', true); before explicit loading of ext.math.mathjax.enabler ]

But it doesn't solve it yet, and I'm not sure why, as MathJax is loaded correctly. The source is in mathDialog function in:
https://he.wikipedia.org/wiki/MediaWiki:Edittoolbar.js

Can you please explain how should we use MathJax modules after the last changes?
Comment 14 Andre Klapper 2014-04-29 03:40:09 UTC
(In reply to Gerrit Notification Bot from comment #11)
> Change 127607 had a related patch set uploaded by Physikerwelt:
> Add default value for user option mathJax
> 
> https://gerrit.wikimedia.org/r/127607

Can only MatmaRex review this, or do you have other reviewers in mind?
Would love to see this getting merged...
Comment 15 physikerwelt 2014-04-29 08:41:55 UTC
My impression is that reviews happen just occassionaly. The coding of Math2.0 was finished at 5th of October 2013. Only a fraction has been reviewed yet.
It would really help if the foundation could assign some reviewers to have a look at all the changes.
This individual commit is just a tiny step into the right direction and won't change anything fundamental.
@Eran: What are your settings in the user page. The checkbox for MathJax must be checked. If there is no checkbox probably $wgUseMathJax is not set to true.
Comment 16 physikerwelt 2014-04-29 08:43:19 UTC
PS: An overview paper over the changes is availible at
http://arxiv.org/abs/1404.6179
Comment 17 Gerrit Notification Bot 2014-04-29 08:46:05 UTC
Change 127607 merged by jenkins-bot:
Add default value for user option mathJax

https://gerrit.wikimedia.org/r/127607
Comment 18 Eran Roz 2014-04-29 16:42:43 UTC
@physikerwelt: it is not related to user setting - the script overrides the user settings. 
mw.user.options.set( 'mathJax', true);//override user settings
mw.loader.using(['jquery.ui.dialog','ext.math.mathjax.enabler'],function(){
		var mathEditor=$('<div>');
		var mathInput=$('<input>',{dir:'ltr'}).appendTo(mathEditor);
		var mathPreview=$('<div>').appendTo(mathEditor);
		mathEditor.dialog({title: 'Math editor', buttons: {
			'Insert': function(){
				$("#wpTextbox1").textSelection('encapsulateSelection', {replace: true, peri: '<math>'+mathInput.val()+'</math>'});
				$(this).dialog('close');
			}
		} });
		mathInput.keyup(function(){
			mathPreview.html('<span dir="ltr" class="tex">$ '+$(this).val()+' $</span>');
			MathJax.Hub.Queue( ["Typeset", MathJax.Hub, mathPreview.get(0)])
		});
		var selection = $("#wpTextbox1").textSelection( 'getSelection' );
		//insert the selected text into the equation editor
		var mathRgx=/<math>(.*)<\/math>/;
		if(selection && mathRgx.test(selection)){
			mathInput.val(mathRgx.exec(selection)[1]);
			mathInput.keyup();
		}
	});
Comment 19 jeremyb 2014-07-02 19:07:14 UTC
This bug hasn't been touched in 2+ months. Is this still an issue?

A user wrote in [[ticket:2014070210002455]] ~17 hours ago:
> I usually have MathJax enabled in my preferences.  Today I noticed that it
> causes equations to just display "Math Processing Error”, rather than the
> equation. Happens on both Firefox and Chrome.
Comment 20 physikerwelt 2014-07-02 19:21:02 UTC
I think the issue has been resolved.
Comment 21 physikerwelt 2014-07-02 19:27:21 UTC
OK. It's still disabled via config.
And there is not yet any mathoid instance for production to the SVG generation will not work even though the required database tables have been created.
Currently the MathJax team is working on a phantomjs less method to render texvc to mathml and svg. Yesterday I have tested that it works quite well. I would appreciate a discussion with ops that to figure out how this can be can go to production. The original idea was to use jenkins to build the mathoid debian package. Even though the debian package builds without any issues in the launchpad ppa repo jenkins can not build the package. If there is a reference project that uses jenkins to build debian packages that go to production this would really help to figure out what is different for mathoid.
Comment 22 Greg Grossmeier 2014-07-02 20:32:33 UTC
(In reply to physikerwelt from comment #21)
> I
> would appreciate a discussion with ops that to figure out how this can be
> can go to production.

Can you start a thread on wikitech-l regarding this, please? That'll get involvement from the relevant people.
Comment 23 Andre Klapper 2014-07-06 22:20:59 UTC
[Resetting bug status as there are no known patches left to review]

(In reply to Greg Grossmeier from comment #22)
> Can you start a thread on wikitech-l regarding this, please? That'll get
> involvement from the relevant people.

physikerwelt: Did you have time to contact wikitech-l yet?
Comment 24 physikerwelt 2014-07-07 08:21:56 UTC
no, I got a hint that there might be a related rt ticket which I wanted to take into account for the wikitech-l thread
 https://rt.wikimedia.org/Ticket/Display.html?id=6077
but I did not manage to access it.
Comment 25 physikerwelt 2014-07-08 16:01:35 UTC
I'm quite good in posting to wikitech-l without to get any feedback...
http://lists.wikimedia.org/pipermail/wikitech-l/2014-July/077422.html
I have the feeling that everybody thinks that there must be someone else who feels responsible for the Math extension related stuff.
From a software design perspective it was an excellent idea to move the math extension away from core. From a social perspective it was not.
Whenever I commit something to master I got feedback within 10 minutes or so.
For the Math extension this situation is quite different.
Comment 26 Daniel Zahn 2014-07-09 01:09:36 UTC
physikerwelt, we reset your RT password as requested but to let you see the ticket it either needs to be moved into the (more public) queue "ops-requests" within RT or you need to be added to the "volunteers" group in RT (which requires https://wikitech.wikimedia.org/wiki/Volunteer_NDA). I updated the ticket to say that as well...
Comment 27 jeremyb 2014-07-09 01:12:56 UTC
(In reply to Daniel Zahn from comment #26)

midair collision...

AFAIK, physikerwelt should already have a copy of everything on the ticket in his inbox. (unless some mail got lost along the way) Already moved to ops-requests for now.
Comment 28 physikerwelt 2014-07-09 03:16:31 UTC
Thank you. Now everything works fine.
Comment 29 physikerwelt 2014-07-09 04:37:56 UTC
According to the original bug description nothing is broken now.
The RT is about enabling Mathoid that outputs MathML and SVG-fallback.
Comment 30 jeremyb 2014-07-09 04:53:37 UTC
(In reply to physikerwelt from comment #29)
does that mean something changed server-side since comment 21? (what to do now with comment 19? can someone reproduce that?)

also, what about the discussion you wanted to have with ops? Greg and I had an earlier midair collision. I think wikitech-l and the existing ticket are both fine places to outline whatever you want to discuss but it then may end up getting moved somewhere else. (a different list or a ticket or a new bug, etc.)
Comment 31 physikerwelt 2014-07-09 05:20:30 UTC
comment 19: I tried to get access to ORTS and it was explicitly denied by Tim Lowery. So I can not see what goes wrong. But I would guess it's a problem with an individual equation.
comment 21: Mathoid and tex-source output are disabled via config. I'd like to focus on the bug title, but that's a problem orthogonal to MathJax. So we should not mix up those things w.r.t. bug numbers, otherwise Bugzilla becomes a complete mess.
The only thing that could be done is to write a user script that manually changes the default value 6 to another value. But that has never been done for any other deprecated rendering mode as well. See http://www.formulasearchengine.com/WikipediaStatisticMathUserSetting
Comment 32 Richard Morris 2014-08-20 06:56:07 UTC
Can this ticket be closed yet? No error are being reported on en.wiki recently so I assume things are working fine.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links