Picture of Antonia Newey
JSON 'Empty _ids:' error
by Antonia Newey - Tuesday, 14 November 2017, 2:15 PM
 

Hi,

(There was a similar posting about this a few years ago, but the previous solution doesn't help me.)

I've downloaded the adapt framework and am editing it according to: https://github.com/adaptlearning/adapt_framework/wiki/Creating-your-first-course

I think the sample course has been updated more recently than the wiki page, but I assumed it would work much the same. Editing course.json poses no problem. I have followed the rest exactly, and tried again with my own numbers, but I am still getting this error:

Running "check-json" task
Empty _ids: b-110
Fatal error: Oops, looks like you have some json errors.

For reference my linking of id -> parentids is:

course -> co20 -> a25 -> b110 -> c155

But I have also tried with the numbers suggested in the guide. I also added a new tracking id (20) to the additional block (but have tried without it as well). Everything has a parentid (except course) that matches the id of the previous addition.

The problem is only ever with block, so I assume it's not registering my new component, but I don't know why.

I feel like I have tried every combination of changes and no-changes there is, so if anyone could help I'd be very grateful.

I have also attached the files if you want to double check.

Antonia

// I am on a Mac (iOS 10.12.6), am using IntelliJ as a text editor, and have npm 5.5.1, node 8.9.1, adapt 2.0.6, git 2.15.0, and grunt 1.0.1//

Picture of Matt Leathes
Re: JSON 'Empty _ids:' error
by Matt Leathes - Tuesday, 14 November 2017, 3:10 PM
 

Hi Antonia

Looking at the files you have attached I can see that you have c-155 in components.json - but no b-110 in blocks.json nor a-25 in articles.json nor co-20 in contentObjects.json

That should present a different error to the one you're getting though, namely:

Orphaned _ids: c-155
Missing _ids: b-110

 I note that the contentObjects/articles/blocks.json files you've attached are all 'minified' (on one line) whereas components.json is not which suggests you've copied the former from the build folder and the latter from the src folder.

I would say to go back and double-check what you've done, making sure you've updated the right files and saved them all.

Note that if you use $ grunt dev instead of $ grunt build it will watch for changes to your files and build those changes as they occur to just the changed files, which is generally a lot quicker.

You can also use grunt to manage the tracking ids, as documented here - but these are really only relevant to enabling SCORM tracking.

Thanks for pointing out that the wiki page is a bit out of date, I've just made some updates to it that should bring it in line with the current sample content.

Picture of Antonia Newey
Re: JSON 'Empty _ids:' error
by Antonia Newey - Tuesday, 14 November 2017, 4:05 PM
 

Yes, you are absolutely right! I had somehow mix-and-matched between editing build and src files. I hadn't added c-155 to component.json in src but added it to component.json in build, and proceeded to upload the build files on here! Whoops!

So, yes, everything is now fixed, it seems I just got a bit muddled.

Thank you for all your help!

Antonia

Picture of Matt Leathes
Re: JSON 'Empty _ids:' error
by Matt Leathes - Tuesday, 14 November 2017, 4:56 PM
 

No problem, once you've got over this initial period of finding your way around you might like to have a look at the build tool we use - it doesn't require you to have two copies of all your JSON and assets, and lets you build multiple courses from the same src.