-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to add this library into a compound content type: "Unable to find constructor for: H5P.CardBlock 1.0" #9
Comments
@ymdahi Works fine here. Have you made sure you're not loading a cached version of some file? Disabling the cache in the developer console's network tab is often a good idea when developing. |
Hmmm... not sure what could be causing this. Cache is disabled on drupal and in the browser's dev console network tab. I've removed the libraries and re-install h5p + libraries. I'm using the hub to "install" the content types (i.e. CP). Should I instead build the content types inside the files/h5p/development? I attempted to add another content type to CP as a test - IFrameEmbed. I am getting the same error when I try this, so I'm assuming there is an issue with my dev environment. |
@ymdahi I see. Yes, you should use the development folder for development ;-) H5P doesn't simply load the files from |
Thank you @otacke , I'll give that a shot. Just to confirm: when working on h5p dev I should:
For instance, I should build the Course Presentation content type within the development folder, as well as any custom content types I may be working on. Also, what is the best way to deal with dependencies in this case? I build CP in that folder, but I'm getting a message that I need to install several other libraries to make CP work. |
@ymdahi You can do both. You can install the regular versions that will end up in |
@otacke Many thanks, I was able to get it working! Some styling issues, but I think I have all the ingredients ready to make this a useful content type. Thanks again for all of your help! |
@ymdahi Don't mention it. |
Problem
Attempting to add this CardBlock library into a compound content type, such as the Course Presentation, yields the following error:
h5p.js?qiqnf5:976: Unable to find constructor for: H5P.CardBlock 1.0
presentation.js:1: h5p-course-presentation.js:1 Uncaught TypeError: Cannot read property 'preventResize' of undefined h5p-course-
Steps to reproduce error
in
h5p/libraries/H5P.CoursePresentation-1.22/semantics.json
in
h5p/libraries/H5PEditor.CoursePresentation-1.22/library.json
Screenshot:
The text was updated successfully, but these errors were encountered: