Mathslate/MathJax fails to load on https

Bug #1575923 reported by Darren James Harkness
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mahara
Confirmed
Medium
Unassigned

Bug Description

On HTTPS-enabled sites, the Mathslate tinymce plugin fails, due to loading http:// resources from yui.yahooapis.com and cdn.mathjax.org.

The file htdocs/js/tinymce/plugins/mathslate/mathslate.html is hardcoded to pull http:// versions of these scripts (lines 11-12).

Ultimately this is an upstream bug, but it's one that affects https-enabled Mahara sites.

Tags: third-party
Revision history for this message
Robert Lyon (robertl-9) wrote :

Hi Darren,

When I made the calls in mathslate.html to be protocol relative it fails to fetch
https://yui.yahooapis.com/3.14.1/build/yui/yui-min.js it looks like the remote server is not set up for https

So to fix this problem we will probably need to avoid using YUI and see if the plugin can be rewitten to use jQuery - which we use natively in Mahara.

Cheers

Robert

Changed in mahara:
status: New → Won't Fix
status: Won't Fix → Confirmed
importance: Undecided → Medium
milestone: none → 16.10.0
Revision history for this message
Robert Lyon (robertl-9) wrote :

Making the plugin use jQuery will be a bit of a challenge as the obsolete YUI code is quite integrated with the plugin

Revision history for this message
Darren James Harkness (darren-athabascau) wrote :

I did the same quick fix on my development instance, and it loaded up perfectly.

It looks like Yahoo may be undertaking maintenance on the https server. I'll check again tomorrow.

Revision history for this message
Darren James Harkness (darren-athabascau) wrote :

Well, I'm definitely wrong on that one, because there is no SSL Api for Yahoo's YUI library. The recommendation from a few sources (stack overflow, various drupal module-level issues) is to include YUI locally.

Robert Lyon (robertl-9)
Changed in mahara:
milestone: 16.10.1 → 17.04.0
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Since this seems to be quite a change, including a library, I'm tagging it just against the next release rather than an official backport.

no longer affects: mahara/16.10
no longer affects: mahara/16.04
no longer affects: mahara/15.10
Changed in mahara:
milestone: 17.04.0 → 17.10.0
tags: added: third-party
Revision history for this message
Matt Di Giuseppe (matthew-digiuseppe) wrote :

To solve this problem I've had to include the entire YUI library from GIT in my local Mahara instance. It is also necessary to edit the mathslate.html file in the MathSlate plugin folder, and change every instance of "http" to "https".

Robert Lyon (robertl-9)
Changed in mahara:
milestone: 17.10.0 → 18.04.0
Revision history for this message
Daniel Thies (dthies) wrote :

Hello Robert,
I developed Mathslate and have been supporting it in Moodle which still includes yui as legacy code. The TinyMCE4 port was mostly intended as a prototype at the time and I did not really really follow up on developing a stable version although it evidently is in use elsewhere.
I appreciate your work in incorporating in in Mahara. Some time ago I started a revision that would update to use only EMCAScript5 (this makes more sense than JQuery because matches MathJax requirements). We are beginning to use Mahara locally now so I will try to give finishing that work more priority. Hopefully, it will be ready in time for 18.04 without having to include yui.

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Hi Daniel,

Thank you very much for your update. If you are testing it on your own instance and want to contribute the code to core Mahara, please do so.

Thanks
Kristina

Changed in mahara:
milestone: 18.04.0 → 18.10.0
Changed in mahara:
milestone: 18.10.0 → 19.04.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.