Support » Plugin: Interactive Content – H5P » h5p.json file not Valid Remixing from Drupal to WordPress

  • Resolved mrjarbenne

    (@mrjarbenne)


    Attempting to remix content from this site (which is built on Drupal) into a fully updated version of the WordPress H5P plugin (updated all the libraries too) and getting this error:

    Invalid data provided for licenseExtras in h5p.json
    The main h5p.json file is not valid

    The help documentation seems to suggest that this might be because the content is built on a newer version of H5P (https://h5p.org/documentation/troubleshooting#invalid-h5p-json-file).

    Is the version in the WP plugin as up-to-date as the Drupal equivalent or are there other issues that might be causing the conflict?

    • This topic was modified 1 month, 3 weeks ago by mrjarbenne.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi!

    I don’t think that the “Invalid data provided” message is covered on the site that you’re linking to. It has nothing to do with the versions, but with a bug in H5P core that you are experiencing. There’s a line break in the license extras description that causes the issue when importing the file.

    There’s a bugfix available as a pull request, but the H5P core team will need to find the time to review it, merge the patch into the official code and release an update of H5P core in the WordPress plugin. They’d have to tell you when that might happen.

    As a workaround: You could replace the line breaks (\n) with a space in the h5p.json file that’s inside the .h5p file that you downloaded. It’s merely a zip file that you can open and modify, but I smell trouble with that if you’re running Windows …

    Cheers,
    Oliver

    Thread Starter mrjarbenne

    (@mrjarbenne)

    You are my hero @otacke

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.