column data with name of a previous field plus more chars throws an error

column data with name of a previous field plus more chars throws an error

verlagerverlager Posts: 18Questions: 3Answers: 0
edited October 2015 in Bug reports

If substring of column data contains name of a previous field plus more chars, that second longer field throws an error.

BUG: http://communitychessclub.com/dataTables_BUG.php

JSON: http://communitychessclub.com/verlager.ajax

JSON SAMPLE:

{
"data": [
{
"game": "5570",
"Date": "10/02/2010",
"Event": "Arkport Open",
"ECO": "A23",
"White": "Kelley, Edward",
"WhiteElo": "2056",
"Black": "Nikolayev, Igor (FM)",
"BlackElo": "2364",
"Result": "0-1"
},

$(document).ready(function() { $('#example').DataTable( { "ajax": "verlager.ajax", "columns": [ { "data": "Date" }, { "data": "Event" }, { "data": "ECO" }, { "data": "White" }, { "data": "WhiteELO" }, //ERROR based on "White" is part of previous column name { "data": "Black" }, { "data": "BlackELO" }, //ERROR based on "Black" is part of previous column name { "data": "Result" } ] } ); } );

This works perfectly in the example: http://communitychessclub.com/dataTables.php in which the problem condition is is lacking.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 54,914Questions: 1Answers: 8,608 Site admin
    Answer ✓

    I don't believe this is a bug in DataTables. In your JSON feed you have:

    "WhiteElo": "2056",
    

    While in your DataTables configuration you have:

    { "data": "WhiteELO" },
    

    Note the difference in capitalisation.

    Allan

  • verlagerverlager Posts: 18Questions: 3Answers: 0

    You are correct!

This discussion has been closed.