Deleting in json nested data bugged even in example
Deleting in json nested data bugged even in example
thekiller222
Posts: 2Questions: 0Answers: 0
Hello, i've been struggling for days with this, when i delete a row there's always the error message " an error has occured" the row is deleted if i refresh but it's really not convenient...
I thought it was from my code until i saw even in the example it's bugged ==> http://editor.datatables.net/release/DataTables/extras/Editor/examples/deepObjects.html
So how to solve this issue??
I thought it was from my code until i saw even in the example it's bugged ==> http://editor.datatables.net/release/DataTables/extras/Editor/examples/deepObjects.html
So how to solve this issue??
This discussion has been closed.
Replies
Allan
[code]
else {
// create, edit or remove
$json['row'] = nestData( $json['row'] );
}
[/code]
However, on the delete action, there is of course no 'row' parameter since the row has just been deleted!
The correct code is:
[code]
else if ( isset($json['row']) ){
// create, edit
$json['row'] = nestData( $json['row'] );
}
[/code]
Which allows it to work as expected.
Are you using the `row` parameter in a similar manner? If not, what is the return from the server on the delete Ajax request?
Allan