Not all libraries are loading - Moodle module

I have a fairly complex interactive video, using several of the libraries. When I don't aggregate assets I can see that not all of the libraries I need are getting loaded, and that's causing JS errors.

I have updated to the latest code from Github for the module. Haven't updated all of the libraries yet (from github) because we are modifying a number of them for custom functionality. The ones it's complaining about are not ones we're changing. Those changes all work and load in videos when there are just a few interactions.

Currently getting: Unable to find constructor for: H5P.Image 1.0

But this hops around between a couple of my interaction types. I have the image library installed, and when I put together an interactive video using just that interaction it works fine.

When I look at my sources I can see that the library isn't being loaded. Only 15 are, and they are all ones that are used. I don't know if there is significance to that number though. Attached a screenshot of that. 

Any pointers on what to look for?

An update after more research. 2 of the libraries that were used for interactions had dependency_type set to editor in hvp_contents_libraries. I switched those over to preloaded and it started working. I'm going to do some more digging on why that happened, may end up putting in a PR.

BV52's picture

Hi keliix06,

I'm glad you found what you are looking for. If you need further assistance or have additional questions feel free to post in the forums.

-BV52

I figured out the issue, and it's not a problem anyone else will run into. I removed the call to getfilteredparameters() because it was filtering out HTML in some fields that I need, and I trust the source of data 100% so I'm not worried about things like XSS attacks (teachers will not have the ability to create their own). In doing that I removed the call to filterParameters() which is what updates the libraries.

BV52's picture

Hi kellix06,

You never know :-) but in any case thank you for coming back with your findings.

-BV52