Updated Libraries, Upgraded Content and Now I cannot save

I updated my Drupal instance's h5p libraries and upgraded content and now I cannot save edits.  I was using official-h5p-release-20160802 along with updates to course-presentation, and a couple of other libraries.  All was working great before I updated the interactive video and video libraries to the latest to correct the iphone 7 full screen issue.  Worked great locally, could view content, full screen issue was corrected.  We later noticed as we neared production that after converting content we could no longer edit and save.  We can create new content, edit and save with no issues but we get the console error pasted below when trying to save the existing content that we 'upgraded'.  There are also 4 error messages in the UI that read: "

  • Library used in content is not a valid library according to semantics
  • Library used in content is not a valid library according to semantics
  • Library used in content is not a valid library according to semantics
  • Library used in content is not a valid library according to semantics

"

Along with the message : " No H5P preview available". 

I am hoping that there is a way to undo the upgrade of our content.  What happens in the content upgrade process?  Where are the changes made?  Just in the source code or the database or both?  I am thinking that the database is updated because I have a backup of the thousand plus content instances that I attempted to restore both before, and after installing the official-h5p-release-20160802 version of h5p.  In both cases the h5p content shows zero instances.  I can still visit the nodes and view them as long as I haven't attempted to save.  The attempt to save any 'course presentation' content makes it so the h5p content does not render and I get the same error when I try to revert to previous revisions.

I have daily backups of the database and source code but I need to go through and select very specific items as there are other people working on other aspects of the projects so a simple replacement of db with dump from 3 weeks ago is out of the question.

   Console Error:

Uncaught TypeError: Cannot read property 'library' of undefined

    at new Interaction (js_eazrJU9iVrsusm4f-bL4zYEwbEqSKBcfOheSgP6UQPE.js:22803)

    at InteractiveVideo.H5P.InteractiveVideo.InteractiveVideo.initInteraction (js_eazrJU9iVrsusm4f-bL4zYEwbEqSKBcfOheSgP6UQPE.js:24501)

    at new InteractiveVideo (js_eazrJU9iVrsusm4f-bL4zYEwbEqSKBcfOheSgP6UQPE.js:24180)

    at Object.H5P.newRunnable (h5p.js?ohf9vt:815)

    at H5P.CoursePresentation.addElement (js_eazrJU9iVrsusm4f-bL4zYEwbEqSKBcfOheSgP6UQPE.js:26628)

    at H5P.CoursePresentation.addElements (js_eazrJU9iVrsusm4f-bL4zYEwbEqSKBcfOheSgP6UQPE.js:26531)

    at H5P.CoursePresentation.attach (js_eazrJU9iVrsusm4f-bL4zYEwbEqSKBcfOheSgP6UQPE.js:26179)

    at Object.H5P.newRunnable (h5p.js?ohf9vt:843)

    at HTMLDivElement.<anonymous> (h5p.js?ohf9vt:141)

    at Function.each (jquery.js?ohf9vt:2)

fnoks's picture

Hi,

I hope I will be able to fix your problems, but first I need some more input:

  1. Are you using only official H5Ps from h5p.org?
  2. Could you paste here (or send by email to [email protected]) the output of running H5P.jQuery('input[name="json_content"]').val(); in the browsers console, when you have one of the problematic nodes open in the editor.

  1. We have one custom h5p module that we are using but it is not being used in all of the course presentation nodes that are giving us problems.   
  2. I emailed you the JSON object from one of the problematic nodes.  

 

fnoks's picture

Hi,

We got your email :)