MathJax seems broken in v2.9.0.beta5

Mathjax seems to be broken in v2.9.0.beta5. We would expect $\frac{1}{2}$ to render when it’s enabled, but it’s not currently working. I’ll point additional admins for our instance to this post. We plan on updating to beta6 next week.

Checking more in depth, I figured out that the javascript file MathJax.2.7.5.js that tries to be loaded is located under /var/www/discourse/plugins/discourse-math/public/mathjax/MathJax.2.7.5.js, while it looks like it tries to load it from a different location, see pic:

Version: 2.9.0.beta6 | Commit: af3262d70a238f31ab54ad0ccf7dd26fb71a5134

I’m unable to repro on Discourse af3262d and plugin version bcaccbd. I’m not sure what you mean with the different location?

3 Likes

I learn something everyday:

public/ This directory will be copied verbatim into the root of the built application. Use this for assets that don’t have a build step, such as images or fonts

1 Like

You are perfectly right. Indeed, I’ve discovered that at precompiling assets time, among many other things, the following symlinks are created under the public/plugins folders:

/var/www/discourse$ ls -al public/plugins/
...
lrwxrwxrwx. 1 discourse root 52 Jul  2 09:17 discourse-calendar -> /var/www/discourse/plugins/discourse-calendar/public
lrwxrwxrwx. 1 discourse root 52 Jul  2 09:17 discourse-graphviz -> /var/www/discourse/plugins/discourse-graphviz/public
lrwxrwxrwx. 1 discourse root 48 Jul  2 09:17 discourse-math -> /var/www/discourse/plugins/discourse-math/public
lrwxrwxrwx. 1 discourse root 57 Jun 21 00:28 discourse-narrative-bot -> /var/www/discourse/plugins/discourse-narrative-bot/public
lrwxrwxrwx. 1 discourse root 44 Jun 21 00:28 styleguide -> /var/www/discourse/plugins/styleguide/public

That was not the case for our infrastructure.

Thank you, so no bug at all, working as expected for the versions mentioned above.

Cheers,
Ismael

3 Likes