Picture of Hendriks Matts
Developed component throws error in authoring tool preview
by Hendriks Matts - Thursday, 24 August 2017, 1:09 PM
 

Hi all

Based on the adapt-contrib-mcq (Multiple Choice Question) i tried to develop my own component. It works fine in my local framework environment and i am able to upload it to the authoring tool, add it to a block and even fill out my defined settings. but when i try to preview it, it throws the following error:

component not found. Is it installed and included? - adapt.min.js (3,23965)

or

Uncaught The component has not been installed, and so is not available in your project. - adapt.min.js:52

As I said, I downloaded the adapt.contrib-mcq.zip and started developing my component by editing the handlebar, javascript and less files. in the end, i updated the bower.json and properties.schema, then i zipped the folder and uploaded it successfully via the plugin management. the component is now visible in the tool and can be used inside a course, but the preview throws that error mentioned above. i did not delete anything, even the file-names are still from the mcq-component. it works locally, but i cannot get it to run in the authoring tool. did i miss something?

Picture of Matt Leathes
Re: Developed component throws error in authoring tool preview
by Matt Leathes - Tuesday, 29 August 2017, 11:29 AM
 

If it's working in the framework but not the authoring tool then it's likely to be something you've missed either in bower.json or properties.schema

Picture of Hendriks Matts
Re: Developed component throws error in authoring tool preview
by Hendriks Matts - Tuesday, 12 September 2017, 3:20 PM
 

thanks! i found the error!

during development i did change the name attribute in the bower.json, but not the component attribute, which lead to 2 components having the same attribute. the course/en/components.json is using the component attribute as identificator, so it had found 2 components and threw the error.

the solution was to delete the unused plugin according to the FAQ:

https://github.com/adaptlearning/adapt_authoring/wiki/FAQ#hdap