How to solve: A system error has occurred (More information)?
How to solve: A system error has occurred (More information)?
nusagates
Posts: 5Questions: 1Answers: 0
When i create new, edit, or delete data using datatables editor i got message: A system error has occurred (More information).
My Javascript Code:
var table, editor;
$(function () {
editor = new $.fn.dataTable.Editor({
ajax: " https://domain/bengkel/1/service/data",
table: "#table",
fields: [{
label: "Nama:",
name: "name"
}, {
label: "Biaya:",
name: "price"
}
]
});
$('#table').on( 'click', 'tbody td:not(:first-child)', function (e) {
editor.inline( this );
} );
table =
$('#table').DataTable({
dom: "Bfrtip",
ajax: "https://domain/bengkel/1/service/data",
columns: [
{data: "name"},
{data: "price"}
],
select: true,
buttons: [
{extend: "create", editor: editor},
{extend: "edit", editor: editor},
{extend: "remove", editor: editor}
]
});
})
My PHP Code:
Editor::inst($db, 'workshop_services')
->fields(
Field::inst('name'),
Field::inst('price')
)
->process($_POST)
->debug(true)
->json();
Response data i got:
{"data":[{"DT_RowId":"row_2","workshop_id":103,"name":"Service","price":30000},{"DT_RowId":"row_3","workshop_id":103,"name":"Ganti Ban","price":15000}],"options":[],"files":[]}
What is wrong? Help me please.
This discussion has been closed.
Answers
Hi @nusagates ,
Did you follow the diagnostic steps in the tech note (https://datatables.net/manual/tech-notes/12) - that would be the best place to start? If still no success, would you be able to link to the page, please.
Cheers,
Colin
Thanks for your reply.
Yes i followed the instruction described at https://datatables.net/manual/tech-notes/12
I enclose screenshot from developer tools.
i did not find any error from there. What should i do then?
Hi,
That is the data that is used to load the table. You need to trigger the error (while you have the inspector open) so you can via the error response from the server. So:
Allan
There is no network activity when i editing something. I sent you the detail via private mesage. Please help me.