NULL data error with patch
NULL data error with patch
mainstreetmark
Posts: 9Questions: 0Answers: 0
For some reason, I keep getting "null" data in sData, even though it looks like data is coming back. This causes a JS error and halts all further JS activity on the page. My fix is, around line 680 (in version 1.5.3):
[code]
/* Snaity check that we are dealing with a string or quick return for a number */
if (sData == null )
{
return null;
}
else if ( typeof sData == 'number' )
{
return 'numeric';
}
else if ( typeof sData.charAt != 'function' )
{
return null;
}
[/code]
[code]
/* Snaity check that we are dealing with a string or quick return for a number */
if (sData == null )
{
return null;
}
else if ( typeof sData == 'number' )
{
return 'numeric';
}
else if ( typeof sData.charAt != 'function' )
{
return null;
}
[/code]
This discussion has been closed.
Replies
This error tends to crop up when the number of columns that DataTables knows about does not match the number that have been given to it. For example this will happen with rowspan and colspan elements. Or if your data arrays are not exactly the right number of elements, or you haven't defined the number of columns quite right :-)
There are quite a few reasons why it could be, but basically it comes down to data and columns not matching.
Regards,
Allan