Replacing or fixing a missing Library

Hi,

[Setup: Locally-hosted H5P v1.15 running on Drupal. PHP version 5.3.3.]

I was using the Hub to do some updates to Content types - there were quite a few - and at the end of rebuilding the cache there was a long page of error messages stating that "The H5P library Advanced Text 1.1 used in the content is not valid."

Looking at the list of libraries under Content>H5P Libraries there was no record of version 1.1 only version 1.0. However in the Libraries folder there is a copy of Advanced Text 1.1. So it looks like the upgrades of the content types lost the library somewhere in the process?

A lot of objects in our set of 4,200 are now not working since this library went missing.

How do I get it back or get it recognized by the H5P system?

Update: noticed that there is a small difference in the Advanced Text 1.1 library.json file that perhaps was updated as part of the Content Type updates done through the Hub compared to an earlier copy on a backup site- also v1.1.

 

Updated version with addition in bold:

{

  "title": "Text",

  "description": "A simple library that displays text with all kinds of styling.",

  "majorVersion": 1,

  "minorVersion": 1,

  "patchVersion": 6,

  "runnable": 0,

  "machineName": "H5P.AdvancedText",

  "author": "Joubel",

  "preloadedJs": [

    {

      "path": "text.js"

    }

  ],

  "preloadedCss": [

    {

      "path": "text.css"

    }

  ],

  "metadataSettings": {

    "disable": 0,

    "disableExtraTitleField": 1

  }

}

 

 

previous version of v1.1:

{

  "title": "Text",

  "description": "A simple library that displays text with all kinds of styling.",

  "majorVersion": 1,

  "minorVersion": 1,

  "patchVersion": 2,

  "runnable": 0,

  "machineName": "H5P.AdvancedText",

  "author": "Joubel AS (icc)",

  "preloadedJs": [

    {

      "path": "text.js"

    }

  ],

  "preloadedCss": 

    {

      "path": "text.css"

    }

  ]

}

 

Is it safe to swap the old version of the library.json file into the current production instance? Will it affect some of the updates to Content Types?

Thanks in advance

Ian

BV52's picture

Hi istory,

Can you please check this thread, I think this is similar to the issue that you are facing.

-BV52

Thanks BV52, that thread does cover something similar but making the change did not fix the problem. The H5PAdvancedText 1.1 library is still not being recognised correctly even though it is present in the folder. The problem is that accordian content does not display at all.

I tried uploading a new accordian package via the hub but it caused an error about a missing h5p.json file. It did update the accordian tool though and existing embedded accordians became visible again.

However they are not editable and the accordian tool does not function to actually make an accordian.

I tried replacing the H5P directory that is under sites/all/ with a current version but it produced a 500 error for the site.

How can I get hte H5PAdvancedText 1.1 library recognised and loaded when the accordian tool is used?

Thanks

 

BV52's picture

Hi istory,

It looks like you would have to remove and re-add this library.

-BV52

Thanks for the suggestion. THe recent update meant that it was easier to just  update the whole system and that fixed the issue. Thanks

BV52's picture

Hi istory,

I'm glad it is working for you now and thank you for getting back to us with the resolution this should help users that experiencing the same issue.

-BV52