Installation

Library browser not generating MathJax content

Library browser not generating MathJax content

by Michael Nyenhuis -
Number of replies: 5

I've installed WebWorK 2.17 on RHEL 8, and I've found that WebWorK does not generate math images in the library browser. MathJax has been installed, $webwork_dir and $webwork2_files are correct, hardcopy prints correctly, as do the homework sets in the browser. When I unarchive a course from 2.16, math displays properly in all three situations.

Checking /opt/webwork/webwork2/tmp after resetting $WeBWorK::PG::ImageGenerator::PreserveTempFiles = 1; there are no files generated, though hardcopy does generate image files. Setting SELinux to permissive doesn't change the problem.

I assume MathJax is not being invoked?

Help would be appreciated! It is possible the permissions on htdocs and subdirectories are the problem, though the file permissions are set to "r" for "Other", which is what Apache would be in this case. I assume js files are read rather than executed.

Thanks!

In reply to Michael Nyenhuis

Re: Library browser not generating MathJax content

by Danny Glin -
When you say that WeBWorK does not generate math images, do you mean actual images (e.g. .png files), or typeset math formulas? Because image files have nothing to do with MathJax.

If we're talking about image files here, then one thing you can try is right-clicking on a broken image and opening it in a new tab. This should allow you to see the error message that is generated. If the error is something like 403-forbidden, then it's probably a permission issue. If the error is 404-not found, then it's more likely a configuration issue where the images aren't being generated. In either case this new tab should give you the full path to where it expects the image to be, which should help with troubleshooting.
In reply to Danny Glin

Re: Library browser not generating MathJax content

by Michael Nyenhuis -

Thanks for the quick reply! WebWorK is not typesetting formulas. If I ask it to display images in the Library browser, I get a 404 message, the images, but no other text. So, for a question such as, "If $f(x)=...$, use the definition of derivative to find $f'(x)$," with MathJax the problem is displayed as "If, use the definition of derivative to find." and with images, I get a big 404, and the f(x)=.... and f'(x) image.

In reply to Michael Nyenhuis

Re: Library browser not generating MathJax content

by Glenn Rice -

We will need some more information to help you diagnose the problem.  Can you open the developer console in the browser and see what messages (if any) are shown there?  For most browsers you can open the developer console with the F12 key.

In reply to Glenn Rice

Re: Library browser not generating MathJax content

by Michael Nyenhuis -

OK. It seems the problem is solved. The sever doesn't have an ssl certificate yet, but I had been using https in accessing it. using http solved the problem. F12 showed that nonsecure content was being rejected, and MathJax output was deemed not secure.

Once the server has an ssl certificate, all should be good.

Thanks very much for the help!


In reply to Michael Nyenhuis

Re: Library browser not generating MathJax content

by Danny Glin -
When you get the SSL certificate installed make sure that you change $server_root_url to https, otherwise your server will continue to serve static content via http.

If you're using lighttpd to serve static content, then make sure that the appropriate config variables are changed to https there as well.