JsMath sometimes it loads sometimes it doesn’t

JsMath sometimes it loads sometimes it doesn’t

by Vitor Gonçalves -
Number of replies: 2

First of all I would like to thank Davide for the good work he’s been doing. I’ve just installed Jsmath in my website that hosts moodle and I have a problem that I can’t quite get it!

When I create a formula for the first time I can see the JsMath menu correctly and the formula as it’s supposed to!

But when I visit a webpage of moodle more then once I just can’t see the formula and JsMath isn’t loaded anymore. I’ve already deleted the cache from my server and my web browser but nothing works! Sometimes when I do refresh for several times of the page that it’s having problems the formula and JsMenu appear as magic!!!

My regards

PS: Sorry for my bad English

Average of ratings: -
In reply to Vitor Gonçalves

Re: JsMath sometimes it loads sometimes it doesn’t

by Davide Cervone -
It turns out that some changes that I made a week and a half ago are the source of this problem. When the Moodle filter cache is enabled (as it is by default) the tag that the jsMath looks for to tell it to process a page is inserted by the jsmath filter, but when the cache is used, the filter isn't called, so jsMath doesn't run.

I have just updated the filter.php file available from the CVS repository (but it doesn't seem to have made it to the CVS page on line yet; perhaps that happens over night). This fixes the problem by adding the required marker to the message itself so that it will be part of the cached version of the message. That should take care of it.

Sorry about the problem. I have the cache turned off here to make it easier to do the development, I didn't see the problem here.

Davide
In reply to Davide Cervone

Re: JsMath sometimes it loads sometimes it doesn’t

by Vitor Gonçalves -

Everything works fine now! Thanks a lot Davide big grin

Vitor Gonçalves