Unable to upload cloned content to Moodle 3.2

Hi there,

We are getting the following error when trying to upload cloned .h5p files to Moodle 3.2 (example attached)

Could not validate H5P file.

Make sure the uploaded H5P contains valid H5P content. H5P files containing only libraries should be uploaded through the H5P Libraries page.

The 'origianal' .h5p uploads without a problem?

Any help appreciated.

tomaj's picture

Hi,

There was a problem with the generated file you downloaded from h5p.org. We'll fix the cause this week, but here is a temporary fix to get the file working.

  1. Open the .h5p file in a zip-program
  2. Go to the /content/images folder
  3. Delete all files with the .H5PCLEANUP extension
  4. Save the .h5p file

You should now be able to uplad the file to your local installation.

- Tom

Hello, I am having the same issue as the user above, except with a course presentation I created using Moodle on my localhost.  I have tried to upload the H5P to my Wordpress site, my web based Moodle site, and the H5P site.  I cannot locate any .H5PCLEANUP extensions and am confused as to where the issue is.  I have attached the H5P file to this message.  Any help will be appreciated!

Attachments: 
tomaj's picture

Hi,

The issue seems to be that the package vailidator doesn't have .vtt files whitelisted. I created a task in our bug tracking system to deal with it.

I'll post back here later, when I've talked to my colleague, with any temporary solutions you can use.

- Tom

 

Ha, thank you for tracking down the culprit!  I removed the VTT files and it uploaded like a charm to my website.  For now what I (and others) can do is not insert captions until after the file is uploaded and ready to go.  Thanks again!!

tomaj's picture

Awesome! Good to hear that you could move forward. We're fixing the whitelisting of vtt-files, and it should be resolved permanently in the next release of the plugin(s).

- Tom

I am having the same issue - I just downloaded a presentation file I was working on from H5P (only 9 MG), then tried to upload it to Moodle - and got the error message "could not validate H5P file". I'm not sure what the problem could be - could you help? The file works fine on H5P. To give you a little more context, the error message says: Make sure the uploaded H5P contains valid H5P content. H5P files containing only libraries should be uploaded through the H5P Libraries page. And I have attached the H5P file. 

UPDATE: This problem was fixed after we updated all the H5P content types on our Moodle site. So not need to reply. 

In addition, I notice that the drag text activity (draggable text items do not appear to the far left of the text any more as they should. 

BV52's picture

Hi askaskens,

It's good hear that this is working. For the first issue I would assume that the presentation has a video with Closed Captioning/VTT file, which previously is not part of the whitelised file types. Upgrading CP in Moodle brought with it the whitelisting of VTTs.

For the drag the words issue please confirm if you are having a similar issue in this post. If so let's continue the conversation on your original post for this concern.

Hi,

I hope this is the right thread to post this:

I want to move an interactive "course presentation" - that contains interactive videos authored in H5P, content embedded in IFrames as well as single response - questions from one moodle course to another.

So, I downloaded it to my local machine, then created a new activity in the other course and tried to upload it using the H5P interface.

But I get this error:

The H5P file could not be uploaded

An unexpected error occured. Check your server error log for more details.

Attached is the screen shot.

One thing that might be causing the issue is that the file is a bit heavy ~ 504 MB. But that's well within the maximum upload file size of the course (set as 999 MB).

In case it matters. I'm using Safari on an iMac.

Any help would be greatly appreciated! I don't want to have to re-create the content!

-- Aman

So now, I got a different error: 

Could not validate H5P file.

Make sure the uploaded H5P contains valid H5P content. H5P files containing only libraries should be uploaded through the H5P Libraries page.

Not sure what's going on :(

Could it be that the verification routine timed out? Just a shot in the dark...

In the meantime, I was able to import the activity using Moodle's regular backup / restore feature, so I'm not stuck on this anymore. But you might want to look into this.

We're using the current version of h5p.

Good luck!

-- Aman

p.s. screen shot of new error attached

 

icc's picture

I believe your assumptions might be right, but to be certain it would be nice if you could check your web server's error log.

If there are no error messages, you may need to temporarily enable them by adding the following to config.php: (before you upload the file)

@error_reporting(E_ALL | E_STRICT);
@ini_set('display_errors', '1');
$CFG->debug = (E_ALL | E_STRICT);
$CFG->debugdisplay = 1;

I seem to be back with a similar prolem. If I upload a H5P in Moodle I get the error

'Could not validate H5P file - make sure uploaded H5P contains valid H5P content'

I'm merely updating files that are already in Moodle so they can only contain H5P content. I haven't created a duplicate file which was my problem last time but I can't get Moodle to accept revised version or new versions of H5P content. File attached - Thanks

 

hello - I had this same problem, but we fixed it by updated all H5P content types on our Moodle side. (note that this process is different than simply updating the H5P plugin). See here to learn how to do it. https://h5p.org/update-all-content-types 

 

That's great, yes, update H5P content on Moodle fixed it. Thanks again

BV52's picture

It's good to hear that's it's working now Baldrick23. Thanks akaskens :-)

-BV52

tim's picture

Hi Baldrick, could I ask what you mean by 'updating files that are already in Moodle so they can only contain H5P content'? Are you creating new content?

Hi Tim. I created some files which I uploaded into Moodle a few weeks ago. I've ammended the information on the H%P files in H5P and now I'm importing them back into Moodle so in effect I'm overwriting what's already in there. That said, I did try uploading something new and got the same error

 

tim's picture

Hi Baldrick,

Sorry for the very late response. It could be that your H5P Moodle plugin is not up to date since the latest content types require the latest php library files. Would you be able to check if you can upgrade your plugin?

Thanks,

Tim