There is much to go on for use to help. I would start by validating the data in the responses for edit and create. Do you get any errors in the browser's console?
Can you post a link to your page or a test case showing the issue?
I have been looking all day and I can not find where the problem comes from.
I have another application that does not use Datatable with data back in Json and it works, so I can exclude the problem from the server.
I really need your help, I can provide you the link but by email only please (prod server).
The row is disappearing because of the JSON return from the server: {"data":[]}. That means that there was no row to show after the edit, and thus Editor (on the client-side) removes the row.
The most common cause for this is that the condition (where()) applied is not met after the edit - i.e. the row has been filtered out. Does date_prevu == $MyDate_1 after the edit? My guess is not. What is $MyDate_1 at that point and what is the value in the db?
Hello Allan,
You're a genius, I'm an idiot.
Actually after loading the variable $ MyDate_1 = "date_prevu" for loading the page, I reset it $ MyDate_1 = "" so the return to display the modification is null.
After removing this line datatable works normally.
Thank you very much.
And I learned something positive tonight, the php file is browsed a second time after the update.
Replies
Sounds like your server script might not be returning the expected response for create and edit. Please see this doc page for information of what is expected:
https://editor.datatables.net/manual/server#Example-data-exchanges
Kevin
Hi Kevin,
Thanks for your response, but the version 1.5.6 of the datatable editor worked correctly before updating in 1.7.2.
There is much to go on for use to help. I would start by validating the data in the responses for edit and create. Do you get any errors in the browser's console?
Can you post a link to your page or a test case showing the issue?
Kevin
Parameter of browser's console after edit :
Response of of browser's console after edit :
actually there may be a problem.
My code HTML page :
Server side php page
Thank you for your help
Hello,
I have been looking all day and I can not find where the problem comes from.
I have another application that does not use Datatable with data back in Json and it works, so I can exclude the problem from the server.
I really need your help, I can provide you the link but by email only please (prod server).
Thank you in advance.
The row is disappearing because of the JSON return from the server:
{"data":[]}
. That means that there was no row to show after the edit, and thus Editor (on the client-side) removes the row.The most common cause for this is that the condition (
where()
) applied is not met after the edit - i.e. the row has been filtered out. Doesdate_prevu == $MyDate_1
after the edit? My guess is not. What is$MyDate_1
at that point and what is the value in the db?Allan
Hello Allan,
You're a genius, I'm an idiot.
Actually after loading the variable
$ MyDate_1 = "date_prevu"
for loading the page, I reset it$ MyDate_1 = ""
so the return to display the modification is null.After removing this line datatable works normally.
Thank you very much.
And I learned something positive tonight, the php file is browsed a second time after the update.
Being a beginner, I learn every day.
Thank you very much Allan.