search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Uncaught DayPilot.Scheduler.resources expects an array object

Asked by Anonymous
3 years ago.

Hi,

When I load a small database ressource I have no error message, but when the size of data is huge i have this bug trace :
jg ../daypilot-all.min.js?v=2018.2.3281:27
rd ../daypilot-all.min.js?v=2018.2.3281:23
doit ../daypilot-all.min.js?v=2018.2.3281:23
request ../daypilot-all.min.js?v=2018.2.3281:23
update ../daypilot-all.min.js?v=2018.2.3281:23
loadResources ../daypilot.php:655
jQuery 7
loadResources ../daypilot.php:645
<anonyme> ../daypilot.php:796
jQuery 2
receiveMessage resource://gre/actors/SelectChild.jsm:271
receiveMessage resource://gre/actors/SelectChild.jsm:471

Can some one help me ? Is this bug fixed in newer version ?
Thanks a lot.
BR

Answer posted by Dan Letecky [DayPilot]
3 years ago.

The Scheduler checks if the object in the "resources" property is an array. If it isn't, it throws this exception.

You should make sure that you are passing a correct object.

I recommend printing the variable to the console:

var resources = ....;  // your object
console.log("resources", resources);
dp.update({resources});

or setting a breakpoint:

var resources = ....;  // your object
debugger;
dp.update({resources});

Then use the browser developer tools to inspect the object.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.