Adding/updating task triggering page reload and task not updating


Hi, when adding a new task, this is triggering a page reload passing the parameters in the query string.
When updating a task, the task is now not updating. I changed the data processor so I could add a header token.

	var dp = new gantt.dataProcessor("/api");
	mode: "REST",
	headers: {
		"X-CSRF-TOKEN": "{{ csrf_token() }}"


Does anyone know how to amend this?


It seems that on updating a task, it is just navigating to http://xxxxxx/programme/1?task_title=yt6666666&task_category=3&datepicker=09%2F08%2F2019&duration=5&task_category=2890&save=

Rather than sending a put request which is what I would expect. Therefore my application does not pick up any of the data as it is expecting a put.

When creating a new task, it is sending a POST request to the correct url. Which is fine, however both of these are triggering a page reload.


Hello Dan,
Usually, Gantt doesn’t reload the page if you add the Data Processor. Here is an example:

It might be related to Gantt or backend configuration, but it is hard to suggest what might be wrong as I don’t see your code.
Please, send me a demo project will all the necessary files so that I can reproduce the issue locally.


Hi @ramil, thanks for your reply.

I have put the code here, I couldn’t get the snippet editor to work with my code however have uploaded anyway.

I am using a custom lightbox implementation too.



Hello Dan,
Thank you for sending me your code.
I modified it and added a custom lightbox. I had to comment your custom lightbox as I don’t have your elements. So, the issue is not reproduced in the updated snippet:
If I modify the task via the custom lightbox, the page is not reloaded.


Hi, sorry for the delay replying.

I checked through and cleaned up my code after checking your snippet.

I was previously using < button > for the lightbox controls:
< button name=“delete” class=“btn btn-danger”>Delete
< button name=“close” class=“btn btn-secondary”>Cancel
< button name=“save” class=“btn btn-primary”>Save

Which were submitting the form. I swapped these out for normal < input type=“button”> and this fixed the issue.