Everything works ok, data is saved in database and it displays correctly.
BUT, once I insert new task and want to edit it it shows me red message “Task not found id=1520673344390”
If I click on some other tasks or refresh page then I can edit this new task.
It looks like gantt not refreshed automatically?
JS code:
[code][/code]
Response code after task insert:
{"action":"inserted","tid":39}
As you can see ID returns correctly. No any js errors in console.
I had this problem as well. My problem was that the different frontend/backend tutorials have slightly different schemas/APIs.
I was mixing Angular 5 with PHP.
The PHP backend tutorial describes the JSON response from your comment:
{"action":"inserted","tid":39}
However the hook from the Angular frontend tutorial is expecting the “id” field to have the key “id” instead of “tid”:
Changing “response.id” to “response.tid” fixed it for me.
Your solution of “refreshData” also probably works, because I assume it fills in the missing ID from the normal GET response instead of parsing the POST response
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan