Update of H5P WordPress Plugin to 1.17: Cannot update content type or content broken after update

otacke's picture

H5P Group released version 1.17.1 of the H5P plugin for WordPress today. It will give you the new visual appearance (except for the ability to change it easily).

I'd wait for version 1.17.2 though if I were you.

Version 1.17.0 didn't load stylesheets and fonts and was quickly replaced by version 1.17.1. The latter is the latest version as of writing these lines, but it causes issues when updating or installing content types.

If you already installed 1.17.0 or 1.17.1 and updated or installed content types, you probably ran into trouble already - and that may be why you are here. Here's your fix:

  1. Go to /wp-content/uploads/h5p/libraries on your server
  2. Find folder names ending in -x.y.z (some semantic version number like 1.2.3)
  3. Rename them and remove the trailing .z (the patch version) - if there is an old folder that bears that name already, remove that old folders first before renaming the other.

If you want to update/install a content type and receive a message like "Invalid data provided for path in ...", then try again later - that's an issue on H5P Group's content type hub server. They need to resolve it there. But feel free to let them know, they may not have noticed yet.

BV52's picture

Thank you for this Oliver! 

otacke's picture

Addendum: If you already updated the cache or tried to view content, you may also need to delete files in /wp-content/uploads/h5p/cachedassets that seem to have been created after you installed the plugin update.

I have over 50 folders with different iterations of .x.y.z suffixes. I need to rename them all? 

This plugin was working beautifully for years and today, right before I go on a break, it stopped working after the update. I thought it might be because of the update not playing nicely with content I made years ago. So I deleted the app and reinstalled it, figuring I would reupload the content. But it says content successfully uploaded and then keeps spinning and I am not able to create or save anything. 

Sigh.

otacke's picture

Sorry to hear that you ran into trouble.

Yes, the folders will need to be renamed unless H5P Group decides to change the implementation of the plugin (migrating to folder names with patch versions). That I don't know about, I am neither affiliated with nor endorsed by H5P Group.

And yes, with the current bug in the plugin, you may run intro trouble with uploading content.

Best,
Oliver

otacke's picture

Another addendum:

Since H5P Group still has not released a fix ... :-/ If the damage is already done, now uploading content etc. fails "unabletocopy", you may want to patch the plugin.

  1. Ensure you have a backup /!\
  2. Locate /wp-content/plugins/h5p/h5p-php-library/h5p-default-storage.class.php
  3. Find line 42 which should read $library['patchVersionInFolderName'] = true;
  4. Change true to false.
  5. Save the file.

That should fix the issue with creating wrong folder names. You will still need to fix folder names as stated earlier in the thread though.

Unfortunately, the update to version 1.17.2 appears to be a failure on our end. The plugin remains stuck in an update loop, and WordPress continues to indicate inconsistencies with the installed version.

In addition, version 1.17.2 seems to introduce even more issues than the previous releases:

  • Errors while updating content types:

    • Invalid data provided for path in H5P.JoubelUI-1.3

    • Invalid data provided for path in H5P.Question-1.5

  • Preview images disappear after the update ( Examples: Course Presentation, Collage).

  • Content type updates fails (Drag and Drop, Find the Hotspot).

It currently feels as if each new update causes more damage than the previous one, which is quite concerning for production environments.

We also noticed that the changelog contains entries such as “Fix annoying …”. This kind of wording does not appear professional for a public-facing changelog and may reduce confidence in the stability of the release. This feels really disappointing even for an open-source code.

Thank you in advance for your attention to this matter.