Picture of Dean Wilson
Cannot add anything to the contentObjects.json
by Dean Wilson - Monday, 4 April 2016, 11:47 AM
 

Please forgive my lack of understanding - I'm new to using Adapt.

I've installed the framework using Git, Node, Grunt etc using the Windows cmd. Now I'm using an IDE (Sublime Text) to edit some of the files within the source. I’m using ‘Grunt watch’ so that any changes I make will update automatically.

When I try edit colours of existing boxes, I can do that FINE. But when I come to edit the contentsObjects.json file just to add another box, my IDE beeps at me and doesn’t allow me to save. I’m literally copying a piece of code from the same page and pasting it in order to simply create another box (and changing the ID), but it won’t let me.

Any ideas what I’m doing wrong?

Picture of Matt Leathes
Re: Cannot add anything to the contentObjects.json
by Matt Leathes - Monday, 4 April 2016, 12:36 PM
 

Sublime Text beeps and won't let you save? I have to say I have never seen it do that before. When it prevents you from saving does it display a message?

If you make a syntax error in the .json then the grunt watch task will probably beep at you to warn you of the error.

Picture of Dean Wilson
Re: Cannot add anything to the contentObjects.json
by Dean Wilson - Monday, 4 April 2016, 1:12 PM
 

Thanks for your reply. 

Yes it may well be Grunt that's beeping at me. No display message to speak of. Though, if I say "grunt build" in the CMD, it does state "empty ID's co-25" and "fatal error: looks like you have some json errors".

I've also tried adding the simple piece of code that's recommended in here: https://github.com/adaptlearning/adapt_framework/wiki/Creating-your-first-course ...but again, I get beeped at, and nothing updates when i check my http://localhost:9001.

 

Picture of Matt Leathes
Re: Cannot add anything to the contentObjects.json
by Matt Leathes - Monday, 4 April 2016, 1:47 PM
 

If you add a contentObject you'll need to include at least one article/block/component set to go in it, it's probably complaining that they are missing.

Picture of Dean Wilson
Re: Cannot add anything to the contentObjects.json
by Dean Wilson - Monday, 4 April 2016, 1:53 PM
 

Yes, right you are.

Just carried on and completed the rest of them, THEN saved. And it works.

Many thanks.