Cannot Add H5P Interactive Content

I am trying to add H5p interactive content to my moodle site as follows.

  • Go to a course I created.
  • Choose "Add an activity or resource".
  • Choose "H5P Interactive Content". 
  • From the "H5Phub: Select content type", I choose any of the available content (e.g. Interactive video) by clicking "Get".
  • Click "Install".

The "H5Phub: Select content type" section disappears and I get the following error in the console:

TypeError: Cannot read properties of undefined (reading 'libraries')

    at n.<anonymous> (h5p-hub-client.js?ver=2022121200:54:137821)

    at ci (h5p-hub-client.js?ver=2022121200:41:47997)

    at zo (h5p-hub-client.js?ver=2022121200:41:68649)

    at yl (h5p-hub-client.js?ver=2022121200:41:105468)

    at us (h5p-hub-client.js?ver=2022121200:41:96715)

    at ls (h5p-hub-client.js?ver=2022121200:41:96640)

    at $l (h5p-hub-client.js?ver=2022121200:41:93670)

    at h5p-hub-client.js?ver=2022121200:41:45312

    at t.unstable_runWithPriority (h5p-hub-client.js?ver=2022121200:49:3844)

    at Qa (h5p-hub-client.js?ver=2022121200:41:45021)

By allowing debugging, I get the following PHP error.

[Mon Jan 16 17:51:07.159516 2023] [php:notice] [pid 227760] [client 197.203.113.71:54171] Default exception handler: Exception - chmod(): Argument #1 ($filename) must be of type string, resource given Debug: \nError code: generalexceptionmessage\n* line 247 of /mod/hvp/classes/framework.php: TypeError thrown\n* line 247 of /mod/hvp/classes/framework.php: call to chmod()\n* line 415 of /mod/hvp/editor/h5peditor-ajax.class.php: call to mod_hvp\\framework->fetchExternalData()\n* line 307 of /mod/hvp/editor/h5peditor-ajax.class.php: call to H5PEditorAjax->callHubEndpoint()\n* line 133 of /mod/hvp/editor/h5peditor-ajax.class.php: call to H5PEditorAjax->libraryInstall()\n* line 289 of /mod/hvp/ajax.php: call to H5PEditorAjax->action()\n, referer: https://infinity-computer-systems.com/apps/mabdae/class/course/modedit.p...

 Any ideas? The following is my system info.

  • Moodle: Moodle 4.1+ (Build: 20221222) Desktop
  • H5P Plugin: 1.23.0 (2022121200)
  • Browser: Chrome

Thanks.

We are having a similar issue except that we do not see the error message. After clicking on 'Get' button for a content type, we do see the install option but after clicking on the 'Install' button, the editor section disappears.

Please help us in resolving this issue at the earliest.

Thanks in advance.

You see the javascript error message if you enable developer mode in your browser (e.g. Ctrl+Shift+I (eye)). As for the php error message, you should visit  /var/log/apache2/error.log on your web server machine.

My temporary solution is to use Lumi (https://app.lumi.education/), create the H5P activity (video, quiz, etc) on the cloud or using the desktop app, then upload the resulting *.h5p file to Moodle.

otacke's picture

It seems there's already a pull request with a bug fix. Cannot answer for the H5P core team though and don't know when they might take a look at that one.

BV52's picture

Hi Oliver,

Thanks for pointing this out.

@everyone - No promises but I will follow up with the dev team.

-BV

papi Jo's picture

You wrote:

"It seems there's already a pull request with a bug fix. Cannot answer for the H5P core team though and don't know when they might take a look at that one."

Tried the PR with the bug fix. Works fine. IMHO this PR should be released ASAP.

Tambien se me presenta el mismo problema. No lo he podido solucionar.

Después de instalar el H5P Interactive Content, no me instala los módulos/actividades (ej. Accordion or Video).
No encuentro el fallo cual puede ser.
Estoy con el Moodle 4.1 con el Moove. He probado a quitar el Theme, dejando el Classic, y nada.
No encuentro el problema.

Tengo la versión 4.1 de moodle con el Moove theme y, depués de intalar el H5P Interactive Content, no me deja instalar los modulos/actividades.

Mismo problema aquí.
Uso Moodle 4.1 con Moove Theme.
Se instala el Plugin pero no instala las actividades/Módulos.