DataTables warning: Requested unknown parameter '0' for row 0

DataTables warning: Requested unknown parameter '0' for row 0

zxarrzxarr Posts: 12Questions: 1Answers: 0

Trying to load json data via an ajax call, but keep getting:
DataTables warning: table id=oracle_settings - Requested unknown parameter '0' for row 0.

Not really sure where to head next... Is it an issue with my json? If so, why does the datatables debugger have no issue seeing the rows?

Any help is appreciated.

Here is the javascript:

$('#oracle_settings').DataTable({
        "dom":          "Tfrtip",
        "serverSide":   true,
        "ajax":         "/settings/get_oracle_settings.php",
        "paging":       false,
        "ordering":     false,
        "info":         false,
        "bFilter":      false,
        "bJQueryUI":    true,
});

Example of the Json coming out of my php script:
http://pastebin.com/3mcFSZQ2

Datatables debugger

This question has an accepted answers - jump to answer

Answers

  • mkleinoskymkleinosky Posts: 46Questions: 6Answers: 5
    edited April 2015
          "bJQueryUI":    true,
          "columns": 
        [
       { "data": "data"}, 
       { "data": "name"    }, 
       { "data": "searchable"   },
       { "data": "orderable"}   
        ]
    
    
  • allanallan Posts: 63,678Questions: 1Answers: 10,497 Site admin
    edited April 2015 Answer ✓

    @zxarr - You are giving DataTables object based data, but not using columns.data to tell it where to read from each column. See this section of the manual.

    Allan

  • zxarrzxarr Posts: 12Questions: 1Answers: 0

    Thanks Allan,

    Sorry for the delay, I wasn't able to get back to the project until now. :)

This discussion has been closed.