Unable to get content through H5P hub in Moodle

When you use the Moodle plugin you can share content to the hub (after registration). But at the moment I can't download any content even so I'm able to search through it. All I get is a "Download failed. Something went wrong. Please try again."

Is downloading not yet implemented or a problem with the Moodle plugin?

Moodle version: 3.10.4
Plugin version: 1.22.3

Summary: 
Download from hub not working
Content types: 
BV52's picture

Hi mattgig,

I just tested this and I was able to download the content. Would you mind providing the following information:

  1. Does this happen for any contents that you try to download?
  2. Do you have any errors in the browser console?

-BV

I've tried different content types (about 20) for every one I get the same error.

The only thing I get in the console is a warning (no error, and it is definitely not the culprit, see below).

jquery.js?ver=2021061100:2 Allow attribute will take precedence over 'allowfullscreen'.attr @ jquery.js?ver=2021061100:2

Just to be on the safe side, can you give me the name of an activity you downloaded successfully?

I also tried on two different installations:

Moodle 3.11: same error (This one runs on the same server as the 3.10.4 installation.)

Moodle 3.10.4: It works! (local development installation).
BTW, I get the same console warning as above in this installation.

So now the question is, what in the server configuration or which combination of plugins might cause such an error.

Any ideas where to start looking?

BV52's picture

Hi mattgig,

Some of the things that you can check:

  1. Check the web server error log file. 
  2. Try to temporarily enable debugging: https://docs.moodle.org/311/en/Debugging#In_config.php
  3. Disable other plugins.

-BV

Hi there :)
Were you able to find a solution to the problem? 

I've freshly installed Moodle and am in the process of trying out all the possiblities. Among my favourites are the H5P activies. I installed the Plugin for the H5P hub and I can create my own content. But when I try to download any of the exercises in the "Shared Content" tab, I get the same error message as mattgig.

The browsers console output isn't particulary helpful. The only thing that caught my eye one message about cookies and their SameSite attribute. But I don't know if that has anything to do with the problem.

Would great to know if and what solution might have been found for the previous described error - maybe that helps me too.

Thanks in advance.

Kind regards, Sarah

Attachments: 

Unfortunatelly, I have not been able to locate the source of the problem and it still persists.

As I'm the only person in our school who uses the hub, I use the workaround of downloading the content and then uploading it again.

It's not working for me either. I can browse and preview hub content but I see the same error. I checked the Apache error log and it looked like ModSecurity might have been blocking: ModSecurity:

Warning. Matched phrase "Get-Content" at ARGS:action. [file "/dh/apache2/template/etc/mod_sec3_CRS/REQUEST-932-APPLICATION-ATTACK-RCE.conf"] [line "329"] [id "932120"] [msg "Remote Command Execution: Windows PowerShell Command Found"] [data "Matched Data: Get-Content found within ARGS:action: get-content"] [severity "CRITICAL"] [ver "OWASP_CRS/3.3.2"] [tag "application-multi"] [tag "language-shell"] [tag "language-powershell"] [tag "platform-windows"] [tag "attack-rce"] [tag "paranoia-level/1"] [tag "OWASP_CRS"] [tag "capec/1000/152/248/88"] [tag "PCI/6.5.2"] [hostname "moo.example.com"] [uri "/mod/hvp/ajax.php"] [unique_id "YZjjUqLT59m-dLjY5etT-QAAA"], referer: https://moo.example.com/course/modedit.php?add=hvp&type=&course=107&sect...

I disabled ModSecurity and it still doesn't work. Stranglely, there are no new errors in the log.

Is there a way to download the .h5p files using the preview URL as a base?

All the best.

BV52's picture

Hi Everyone,

The development team is looking into an issue with downloading contents from the Hub. Just last week I also started having issues downloading contents into my test site (uninstalling Moodle and reinstall did not help). The dev team mentioned that the OER Hub is not 100% complete, mostly sharing and UI is done but downloading is not yet there.

-BV