Error using updateTask -- "undefined is not an object (evaluating 'task.$source')"

Hi there!

I’m having an issue using the updateTask function. Every time I use it, there is no change to my task and I receive this error message:

“undefined is not an object (evaluating ‘task.$source’)”

I understand that the $source property is used to reference links belonging to my task, however my implementation of the gantt chart does not currently use links – It’s essentially a stack of tasks for the time being. I’m unsure if this is related to my issue.

I’m creating a new task object and passing it as a parameter in the updateTask function. I’ve made sure to include both the $source and $target properties in my task object (both set to empty arrays), but this doesn’t seem to solve the issue. I feel there must be something I’m doing wrong here. Or perhaps my tasks are set up incorrectly. Any help on this would be greatly appreciated!

Hello Gabriel,
I tried to reproduce the issue in the following snippet:
https://snippet.dhtmlx.com/suy592a8

But it works correctly.

Probably, the issue is related to the Gantt configuration, but it is hard to suggest what might be wrong as I don’t see your code.
Please add your configuration to the following snippet and make sure that the issue is reproduced there:

Then, click on the Save button and send me the link.
Or send me a ready demo with all the necessary JavaScript and CSS files so that I can reproduce the issue locally.