Big datatable stops at "Processing..."
Big datatable stops at "Processing..."
Hi all ... I have a big fat datatable with 466 rows coming from a slow server.
When the page finishes loading, the table is blank with the "Processing..." notification showing.
As soon as I hit the "Next" link, the first page of rows appears.
What's going wrong here? How can I ensure that the first page of results shows up on load?
I don't want to publish the contents of the table to the world, but the config as reported by debug is as follows:
[code]
DataTables 1.9.2
Data source Javascript
Processing Client-side
Draws 0
Columns 19
Rows 466
Display start row 0
Display length 10
Auto width Disabled
Deferred rendering Enabled
Filtering Disabled
Length change Enabled
Pagination Enabled
Processing indicator Enabled
Scrolling None
Sorting Enabled
State saving Disabled
Table information Enabled
[/code]
The table state looks a bit suspect (why would total and display be 0?):
[code]
Display start row 0
Display length 10
Records total 0
Records display 0
[/code]
All the data is present in the debug log. (I couldn't figure out where to find it in Firebug.)
Any advice would be sorely appreciated.
When the page finishes loading, the table is blank with the "Processing..." notification showing.
As soon as I hit the "Next" link, the first page of rows appears.
What's going wrong here? How can I ensure that the first page of results shows up on load?
I don't want to publish the contents of the table to the world, but the config as reported by debug is as follows:
[code]
DataTables 1.9.2
Data source Javascript
Processing Client-side
Draws 0
Columns 19
Rows 466
Display start row 0
Display length 10
Auto width Disabled
Deferred rendering Enabled
Filtering Disabled
Length change Enabled
Pagination Enabled
Processing indicator Enabled
Scrolling None
Sorting Enabled
State saving Disabled
Table information Enabled
[/code]
The table state looks a bit suspect (why would total and display be 0?):
[code]
Display start row 0
Display length 10
Records total 0
Records display 0
[/code]
All the data is present in the debug log. (I couldn't figure out where to find it in Firebug.)
Any advice would be sorely appreciated.
This discussion has been closed.
Replies
I might mention that this *used* to work for the whole dataset using datatables 1.7.2
Allan
Allan
[code]TypeError: a is null[/code]
in this line: https://github.com/collective/collective.js.datatables/blob/master/collective/js/datatables/resources/media/js/jquery.dataTables.js#L11827
[code]return a.replace( /<.*?>/g, "" ).toLowerCase();[/code]
When I specify [code]"bSort": false[/code] rendering succeeds, so my table contains some unsortable values.
Allan
I set a breakpoint in Firebug and ran with sorting enabled, and inspected aoData[i] one frame up from where the exception is raised, namely: https://github.com/collective/collective.js.datatables/blob/master/collective/js/datatables/resources/media/js/jquery.dataTables.js#L3968 (referencing this, because it's the version I'm using).
That showed me that two columns contained null values. They corresponded to Python None values in my data source method. Substituting the string "Missing" for None fixed the display.
Possibly datatables could cast everything unsortable to strings (but that may be nasty magic). At any rate, it would be helpful to _fnLog that there's a problem.