json's upload blues

DJEB's picture

Howdee,

I saved an H5P file, then tried to upload it on a site and got:

Invalid data provided for language in h5p.json
The main h5p.json file is not valid
A valid main h5p.json file is missing

H5P file: 
fnoks's picture

There is problem a with this file. The language field in the h5p.json is empty, which is not allowed. Could I ask if you know which platform (Drupal or wordpress?) you downloaded it from, and also the version of the H5P plugin/module on that site?

I have fixed the file, and added it here.

H5P file: 
DJEB's picture

Hi,

It was the latest H5P version for Wordpress.

Muchas thanksias for fixing that file. You saved me a truckload of work.

fnoks's picture

My pleasure! :)

Hey!

I also have the error "The main h5p.json file is not valid" when uploading a h5p package ... See attached. Latest h5p version for Drupal 8.

How did you fix this file, fnoks??

thx peopl

The file had been downloaded from another Drupal 8 site, and het h5p.json file contained two errors: title ws not Course Presentation and "H5P." was missing in the mainLibrary entry, plus a space was added between Course_Presentation ... Changing manually these in the json file (create zip - change and rename to .h5p file) did the trick...

BV52's picture

Hi bramb,

I'm glad you found the solution and thank you for sharing it here.

-BV52