Error in smart rendering extension

File: dhtmlxgantt_smart_rendering.js
Line 16
Error description: “Uncaught TypeError: n.restore is not a function”

I have this settings turned on:
gantt.config.smart_rendering = true; // when this is false everything works fine
gantt.config.static_background = true;
gantt.init(“gantt_container”);
gantt.parse(data); // if I replace parse with load everything works

Data is an JS array with tasks, works ok without smart rendering.
If I switch to gantt.load and load exactly the same data from serverside everything is working, even with smart_rendering turned on.

Please help.

“n.node” is undefined so I changed script a little bit with “if (n.node) n.restore(e[a])”, now everything is working but I am not sure if this is ok…

Hi,
can you send a sample of data that caused the issue?
The parse method by itself should work ok, since it’s working ok in our demos
docs.dhtmlx.com/gantt/samples/08 … weaks.html
So probably it’s something related to the data

Data is ok I checked about 10 times. :slight_smile:

Some fields are added to addition to default ones.
I executed JSON.stringify({data: arrayList[0]}); on my list with first record only, so that you can see example.

“{“data”:{“id”:12345,“text”:“John, Doe”,“start_date”:”",“duration”:"",“progress”:0,“open”:false,“parent”:0,“color”:"#CFCFCF",“textColor”:"#000000",“type”:“project”,“special_type”:“employee”,“eng_id”:"",“eng_no”:"",“eng_desc”:"",“emp_id”:12345,“emp_desc”:“John, Doe”,“remark”:""}}"

Hi,
still can’t reproduce the error with the record you sent:
docs.dhtmlx.com/gantt/snippet/c5325a39
Can you please provide a complete demo?

It’s too heavy to isolate it in demo. I can send you a private msg with url and credentials to my public application so that you can check it out?