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.
AI-generated summary
MathJax Issue in v2.9.0.beta5
A user, dguest, reported that MathJax is broken in v2.9.0.beta5, preventing formulas like \frac{1}{2} from rendering. trobiyo investigated and found that the issue was due to the location of the MathJax.2.7.5.js file. However, RGJ was unable to reproduce the issue with Discourse af3262d and plugin version bcaccbd.
trobiyo later discovered that the problem was due to missing symlinks in the public/plugins folder, which are created during asset precompilation. The issue was not a bug, but rather a misconfiguration in their infrastructure.
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 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
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

