donhinkelman / moodle-block_sharing_cart

Content sharing plug-in for Moodle LMS. Now at version 4.4, release 3 (actually this is for Moodle LMS version 4.3. Requires PHP 7.4.
7 stars 38 forks source link

Javascript Caching causes buttons to freeze in 3.6-3.8 #31

Closed donhinkelman closed 4 years ago

donhinkelman commented 4 years ago

The first testing in Moodle 3.8 shows this issue reported by Osvaldo in the Plugins Database Forum:

"Just updated to moodle 3.8 and sharing cart is not working. More exactly, every time we turn edition on, all edition button freezes. Then, if we purge all caches and return to course, that's ok. But if in sequence we turn edition off and on again, the freezing problem returns.

I have asked Osvaldo to provide the theme used when this issue appears.

canatojr commented 4 years ago

Ok, here it is!

The problem seems to be the same in all themes. Tested in Boost, Adaptable and Classic. Also tested in different browsers. A detail that I just discovered is that we don't need to purge all caches but only the JavaScript cache.

canatojr commented 4 years ago

I found that a temporary solution is to leave javascript caching disabled. But moodle team advise: "Javascript caching and compression greatly improves page loading performance. it is strongly recommended for production sites."

kdidier51 commented 4 years ago

I have the same problem. "More exactly, every time we turn edition on, all edition button freezes. Then, if we purge all caches and return to course, that's ok. But if in sequence we turn edition off and on again, the freezing problem returns". The problem seems to be the same in all themes.

canatojr commented 4 years ago

Glad to report that the issue was solved once done the moodle update to 3.8.1 version!

donhinkelman commented 4 years ago

Dear Canatojr, Thank you very much for your testing and re-testing. Let me confirm. The Sharing Cart problems occured in Moodle 3.8.0. But those same problems disappeared after upgrade to Moodle 3.8.1. Is that correct? And do you know what in 3.8.1 caused that fix to happen?

canatojr commented 4 years ago

Hello Don! Yes, after upgrade to Moodle 3.8.1, those problems disappeared. Remember some days ago I found a temporary solution about turning off the JavaScript cache? So, I guess Moodle 3.8.1 bring some modification in its JavaScript cache code.

kdidier51 commented 4 years ago

Hi Don, With a Moodle 3.8.1+ (02.14.2020) and the plugin 3.6 release 2 (2020021000) and EDGE, all is Ok. But the problem is Always the same with Firefox and Chrome. I Don't use the canatojr's solution : turning off the Javascript cache. So, for the moment, I only use EDGE for Moodle. Sincerely

donhinkelman commented 4 years ago

I found another problem when using Sharing Cart 3.8, release 1 in Moodle 3.8.1+. The "Copy to Sharing Cart" icon in the dropdown menus does not appear, both in Firefox and Chrome browsers. I have alerted Praxis developers, and they replied they will fix it asap.

Roussxx commented 4 years ago

Hi, Same issue in Moodle 3.8.2 with SC 3.8 release 2. When edition turned on, all section's edition button freezes. need to purge the caches to recover the buttons. Please note that the problem appears after the upgrade from 3.6, release 1 2019012000 to 3.8 release 22020032600 (version with kart icon)

Roussxx commented 4 years ago

Just add that, as mentionned before, leave javascript caching disabled solves the problem.

donhinkelman commented 4 years ago

Thank you Roussxx, for reporting the issue, which confirms what kdidier and canato earlier found. I have renamed the issue to be more specific, and will ask Praxis to work on this. Note to all, if you experience this problem, the workaround is to disable javacript caching.

Roussxx commented 4 years ago

Hi, Just to advise that javascript caching issue still here with Sharing Cart 3.8, release 3. thks

kdidier51 commented 4 years ago

Hi, I confirm. All is Ok for the first time and then, buttons and "Insert a new activity" don't work. In June, July and August, teachers used very much Sharing cart for the new courses. Import is not so easy than sharing_cart. With moodle 3.8.2 and sharing_cart 3.8 release 3 - 2020041200 Thanks for futur good news ... insert a new activite is not operational

plourdej228 commented 4 years ago

Hi I have Moodle 3.8.3 and sharing_cart 3.8 release 3 2020041200 and I have the problem. If I disable the Java caching it's ok. Thanks.

Mikkeljeppesen1 commented 4 years ago

@canatojr @kdidier51 @plourdej228 @donhinkelman

I just made a new moodle site version 3.8.3+ (build: 20200522) with sharing cart version 2020041200, and tested it in firefox and chrome without any problems with freezing buttons or the dropdowns. I have javascript caching on and didnt purge any caches. Have one of you tried to first disabled javascript caching and then enable it again. When you do that it will rebuild the cache and may help. Please update your sharing cart to the newest version, and let me know the outcome

kdidier51 commented 4 years ago

Hello, I have tried on my test platform and done : first disabled javascript caching and then enable it again. But, that does not work. There is always a big red error message on the console (F12). i have the latest version. This message is present only on the course where Sharing cart is installed. If javascript caching is disabled, it's good, but some functionality is disrupted. If you want, I can give you a login and password to see on my test platform. Sorry. And excuse me for my poor English. Best regards Didier CABY (France)

Le mer. 27 mai 2020 à 09:49, mikkeljeppesenPraxis notifications@github.com a écrit :

@canatojr https://github.com/canatojr @kdidier51 https://github.com/kdidier51 @plourdej228 https://github.com/plourdej228 @donhinkelman https://github.com/donhinkelman

I just made a new moodle site version 3.8.3+ (build: 20200522) with sharing cart version 2020041200, and tested it in firefox and chrome without any problems with freezing buttons or the dropdowns. I have javascript caching on and didnt purge any caches. Have one of you tried to first disabled javascript caching and then enable it again. When you do that it will rebuild the cache and may help. Please update your sharing cart to the newest version, and let me know the outcome

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/donhinkelman/moodle-block_sharing_cart/issues/31#issuecomment-634491266, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHBM2XX2HMEGFEKWCNQVVWDRTTAZVANCNFSM4J27ANTA .

plourdej228 commented 4 years ago

Hi I made a test too. I purge all the cache, I Turn editing on and it's ok. I turn off editing and i turn on again and it doesn't work.

I also see an error in the console when the bug occurs. error.log

I'm from Quebec and I speak french so my English is not very good.

Thanks for the support.

donhinkelman commented 4 years ago

Thank you all for your persistent reporting of the javascript issue. It is beyond my understanding and I hoped by ignoring it, it would go away. ;-) So, why am I not experiencing this freezing problem? I checked with my school's server admin, and he showed me that Moodle caching system is rather complex. Much more than just "Javascript caching" enabled/unenabled (our server has Javascript enabled in the main setting). However, when you look here, you see that there are seven different caching systems, and according to him, the Redis caching is one related to javascript.

Screen Shot 2020-05-28 at 11 13 58

However, notice that while the Redis has a green check mark, but the store is listed as zero (0). This means there is no caching happening. My engineer was surprised to discover this, and immediately tried to turn it on, because our Moodle 3.8 was running slow. He could not immediately fix it, so I will report later what happens. For now, please check your server setting and see if your Redis has a Store= 1 setting. That is what we are trying to do. By the way, I am from Hokkaido, Japan and although I am an English teacher, my English is not very good. :-) Thank you for kindly working in a foreign language to solve this problem.

Mikkeljeppesen1 commented 4 years ago

Hey guys,

Found the problem on moodle (tracker https://tracker.moodle.org/browse/MDL-67327).

If you read the thread, you will see that the problem seems to be with the plugins you have installed and not with the moodle. I think thats why Don Hinkelman and i dont get any problem with freezing elements.

Everone with the problems: please read the thread to get more information about it.

donhinkelman commented 4 years ago

Hi Mikkel, thanks for checking that out. I see two plugins mentioned: qtype_wordselect and mod_treasurehunt from the plugins database. How about Didier and Lourde? Do you use those plugins? Or other plugins that might be suspect? For your information, here at my school, our engineer re-installed the Redis cache to Store = 1. No Sharing Cart problems followed. So

donhinkelman commented 4 years ago

Oops, I hit the "Close" button by mistake. Let's see if removing suspect plugins will solve this issue.

Mikkeljeppesen1 commented 4 years ago

Hi Don, I haven't tested other plugins, and my knowledge about the "plugin problem" is from the tracker. None of the plugins we use on a daily basis have given us problems so far.

Edited: We don't use the plugins you mentioned

plourdej228 commented 4 years ago

I don't use the plugins qtype_wordselect and mod_treasurehunt. For now I don't have a Redis cache. I will continue searching if I find another plugin causing problem.

plourdej228 commented 4 years ago

Hi, I have found a theme in my Moodle causing problem. It's "home-made" theme use in Schoolboard in Quebec. We'll communicate with the authors to see if they can fix this problem.

Thanks.

donhinkelman commented 4 years ago

Thanks for checking that out. Custom themes are often a problem. The Sharing Cart is tested in Moodle standard themes, and we ask custom theme developers to help make it compatible with their themes. Is it OK to close this issue?

plourdej228 commented 4 years ago

For me it's ok.

Mikkeljeppesen1 commented 4 years ago

@donhinkelman it's okay for me too

donhinkelman commented 4 years ago

OK, I will close this issue, and put new version of Sharing Cart 3.8 release 10 on the plugins database. Feel free to ask to reopen this issue if we find this problem returning.