Editing a field returns an error (system error has occurred)

Editing a field returns an error (system error has occurred)

xdequinzexdequinze Posts: 8Questions: 2Answers: 0

I'm trying to implement the inline edition of fields of a datatable.
When clicking on the field, the value is edited and everything seems to be right but this message appears below the datatable field (in the cell) after updating correctly the database table:

"A system error has occurred (More information)."

More information references => https://datatables.net/manual/tech-notes/12

The edited field keeps then the focus obliging to refresh the page.

Here is the json answer (valid json following https://jsonlint.com/)

"{\"data\":[{\"DT_RowId\":\"row_12662460\",\"ds_pluv\":\"555\"}]}"

I have also used debug datatables and the result is "15 tests complete. No failures or warnings found!"

Is it possible to get any help for this problem ? I'm stuck with this, and I wonder if it could be a bug.

Xavier

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,305Questions: 26Answers: 4,947
    Answer ✓

    The problem is that it is that it is a string containing a JSON string. It looks like the server script has parsed the original data into a JSON string then it was parsed again into a JSON string.

    It should look like this. Notice that the escaped quotes (\") and the outer most quotes are gone. Copy this into jsonlint.com and notice how it is parsed into a data structure.
    {"data":[{"DT_RowId":"row_12662460","ds_pluv":"555"}]}

    Kevin

  • xdequinzexdequinze Posts: 8Questions: 2Answers: 0

    You are right. Many thanks, Kevin.

    Xavier

This discussion has been closed.