H5P not working on moodle

Hello all,

 

I'm a new french administrator on a moodle platform, i wanted to use H5P on it. I took my install.zip on moodle plugin library and i installed it.

1) Then when i want to create  new ressources using any H5P media the loading please wait button keep turning on.

2) My Moodle version is 3.5.2+

3) Desktop platform.

4) Using firefox

5)H5P version 1.19.1

6) nothing is working

7) Brower console errors :

A ERROR :

Échec du chargement pour l’élément <script> dont la source est « mywebsite/moodle/pluginfile.php/1/mod_hvp/libraries/H5PEditor.TableList-1.0/h5p-editor-table-list.js?ver=1.0.4 ».

error { target: script, isTrusted: true, eventPhase: 0, bubbles: false, cancelable: false, defaultPrevented: false, composed: false, timeStamp: 25620, cancelBubble: false, originalTarget: script, … }
h5peditor.js:124:15  

B ERROR :

Échec du chargement pour l’élément <script> dont la source est « mywebsite/moodle/pluginfile.php/1/mod_hvp/libraries/H5PEditor.RangeList-1.0/h5p-editor-range-list.js?ver=1.0.6 ».

ns.libraryRequested/</<
https://mywebsite/moodle/mod/hvp/editor/scripts/h5peditor.js:124:15
ns.loadJs/script.onerror

 

C ERROR ;

Échec du chargement pour l’élément <script> dont la source est « mywebsite/moodle/pluginfile.php/1/mod_hvp/libraries/H5PEditor.ShowWhen-1.0/h5p-show-when.js?ver=1.0.5 ».

ns.libraryRequested/</<
https://mywebsite/moodle/mod/hvp/editor/scripts/h5peditor.js:124:15
ns.loadJs/script.onerror

 

8) I think no PHP error

9) Nothing really visual except the rolling loading circle never coming to H5P app.

10 & 11) No particular change the moodle is virgin from any change.

 

Hope you have enough information, if you want more you can ask. Sorry for my english

regards,

 Vincent

BV52's picture

Hi Vincent,

Could you please double check if you have PHP errors.

-BV52

I noticed an HTTP/2 error 200 on chrome. We contacted OVH and are waiting for their answer.

As we have no answer from anyone we are still testing kind of everything. It appears that PHP CGI mode is working on some apps, but not all. PHP FPM was working well before July. But they've changed their datacenter on july...

hello,

No php errors too

Hello,

Still no answer ? :(

BV52's picture

Hi Vincent,

I was hoping that someone from the community may have some ideas on how to fix issue. Anyway I am sending your question to the core team. Although they may not be able to respond as quick as they want since there are a lot on their plate.

-BV52

icc's picture

Hi Vincent,

I assume you replaced the domain in the URLs and that you are not actually using 'mywebsite' in the URLs.

Have you checked that the user has the 'mod/hvp:getcachedassets' permission?

Could you check the network in your browser to see that the actual HTTP response code is, .e.g 404, or 403, or 500?

Thanks for your answers,

Already checked : Permissions on users : OK

                                HTTP Return 200 all OK

                                It works on PHP CGI mode but not on PHP FPM. But the CGI mode is not compatible with others websites so... I'm stuck to my condition. What is strange is that it was working perfectly on June 2019. And now, without any changes it does not work anymore (not even for administrator).

You can try to visit this link where we put a free access H5P ressource : https://www.tarn.educagri.fr/moodle/mod/hvp/view.php?id=1444

 

icc's picture

Hm, I do not have much experience with this but I'm guessing this has something to do with how Moodle's plugin file is sending this file and HTTP2. Since, in this case, Moodle uses PHP to send the .js file. Are you sure you're not using different PHP installations/extensions for the PHP CGI and PHP FPM? 

I found a similar issue here: https://stackoverflow.com/a/58238847/588777

Thanks a lot for your answer !

i did this : https://stackoverflow.com/a/58857699

 

simply adding a line in my htaccess makes h5p works perfectly again.

This line is  " SetEnvIfNoCase Request_URI ^ / thumb.php no-gzip -vary "

It solved the ERR_HTTP2_PROTOCOL_ERROR 200     problem.

 

 

BV52's picture

Hi Vincent,

I'm glad you got it working and thank you for getting back to use with your resolution.

-BV

paviodmuniz's picture

Thanks a Lot, I use OVH hosting also, and the line " SetEnvIfNoCase Request_URI ^ / thumb.php no-gzip -vary " in the htaccess file solved my problem. Congrats!

paviodmuniz's picture

Thanks a Lot, I use OVH hosting also, and the line " SetEnvIfNoCase Request_URI ^ / thumb.php no-gzip -vary " in the htaccess file solved my problem. Congrats!