Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exception #164

Closed
nite opened this issue Aug 11, 2015 · 5 comments
Closed

exception #164

nite opened this issue Aug 11, 2015 · 5 comments

Comments

@nite
Copy link

nite commented Aug 11, 2015

I regularly get this as a javascript alert with a datatable - very easy to reproduce if I flip to another tab (than the DT is on) before it finishes first render. Any ideas?

DataTables warning: table id=DataTables_Table_1 - Error in seq.default(as.integer(q$start) + 1L, length.out = as.integer(q$length)): length must be non-negative number

filter = "bottom", options = list(deferRender = F,autoWidth = F,dom = "frtiS",scrollY = 600,scrollCollapse = F),extensions = c('ColReorder', 'ColVis', 'Scroller', 'TableTools'))

@yihui
Copy link
Member

yihui commented Aug 14, 2015

Could you provide a self-contained example? Thanks!

@phillc73
Copy link

Users of my application are also reporting a very similar errors:

DataTables warning: table id=DataTables_Table_9 - Error in seq.default(as.integer(q$start) + 1L, length.out = as.integer(q$length)): length must be non-negative number

DataTables warning: table id=DataTables_Table_12 - Ajax error. For more information about this error, please see http://datatables.net/tn/7

Providing a self-contained example is very, very difficult because the issue is so intermittent. I've never seen it personally in testing, and of perhaps 100 regular users, only two or three have reported it happening once or twice. None of them are very technical. Perhaps the best I could do is obtain a screenshot.

I could specifically extract table id=DataTables_Table_9 (or 12) into a self-contained example to see if you can reproduce. However, I'm not sure how to determine which is table id=DataTables_Table_9, without reference to the id names used in my application.

@yihui
Copy link
Member

yihui commented Sep 14, 2015

@phillc73 Okay, let me push a potential fix anyway even though I cannot reproduce the problem. Thanks!

@phillc73
Copy link

@yihui I was going to say that the linked datatables page suggests adding:

$.fn.dataTable.ext.errMode = 'throw';

To throw the errors to console. I was considering doing this in my app, but if this will be your fix anyway....

@yihui yihui closed this as completed in 9807a30 Sep 14, 2015
@yihui
Copy link
Member

yihui commented Sep 14, 2015

Okay, I think the error should go away now in the development version. Ideally I should find a fundamental fix, but it is so difficult without a reproducible example...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants