Searchpanes error after upgrade to latest build: Requested unknown parameter 'total' ....
Searchpanes error after upgrade to latest build: Requested unknown parameter 'total' ....
itajackass
Posts: 165Questions: 49Answers: 3
Hi, after downloading and updating datatables to latest build with this config:
JSZip 3.10.1, pdfmake 0.2.7, DataTables 2.1.4, Buttons 3.1.1, Column visibility 3.1.1, HTML5 export 3.1.1, ColReorder 2.0.4, FixedColumns 5.0.1, FixedHeader 4.0.1, Responsive 3.0.2, RowGroup 1.5.0, RowReorder 1.5.0, SearchPanes 2.3.2, Select 2.0.5
I get this popup warning:
Requested unknown parameter 'total' for row xxxxx, column yyyyyy ......
for each columns i've set in this way:
{
targets: [ 'columnX', 'columnY', 'columnZ' ],
searchPanes: {
show: true
}
},
So, in this case, i get 3 popups!
If I revert to myprevious build, no errors:
JSZip 3.10.1, pdfmake 0.2.7, DataTables 2.0.8, Buttons 3.0.2, Column visibility 3.0.2, HTML5 export 3.0.2, ColReorder 2.0.3, FixedColumns 5.0.1, FixedHeader 4.0.1, Responsive 3.0.2, RowGroup 1.5.0, RowReorder 1.5.0, SearchPanes 2.3.1, Select 2.0.3
The problem is that i can't replicate the error to a live.datatables website... i don't know why.
I don't know "total" parameters what is ....
This question has accepted answers - jump to:
Answers
Are you loading a language file? There was a similar issue recently - see here.
Allan
yes i'm using italian lang
That will do it - hopefully the solution in the other thread will help fix it for you.
Allan
Thanks, fixed using nightly of searchpanes. But now i'm still get another error but i don't know what plugins causing it (most probably rowreorder after some test).
Still about language files: if I remove language, error disappear:
My actual build is ( + searchpanes nightly ):
If you could link to a test case showing the issue please, I'll take a look into it.
Allan
tried to create an example here but, i don't know why, problem not appear
on my localhost (wamp) it also works!!!
on my webapp (live) is not working: DataTables warning: table id=tabella - Requested unknown parameter '1' for row 0, column 1
Have you followed the troubleshooting steps at the link in the error?
https://datatables.net/manual/tech-notes/4
Let us know what you find.
Kevin
Ok i've found that the problem is an outdate version of my it_IT.json file.
The strange things is that using my localhost or live.datatables.net no problem using old json lang file.... but on my production website I get the error!
live debug:
Anyway this is my old lang file causing error: https://raw.githubusercontent.com/itajackass/datatables-files-test/main/Italian_broken_file.json
Only difference is some missing strings from latest here: https://cdn.datatables.net/plug-ins/2.1.5/i18n/it-IT.json
Forget my latest comment. i've not found the problem yet
After some test, the problem occurs only on production server using:
If I remove $.extend all works great (of course in english default language)
If I set lang directly on initialization all works great:
So the problems seems to be $.extend( $.fn.dataTable.defaults, but I repeat, using my wamp localhost or live.datatables.net i can't reproduce the problem... only on my production server it get error
It seems a problem like this one: https://datatables.net/forums/discussion/78509/searchpanes-raises-an-error-if-fn-datatable-defaults-contains-language-url
Have you tried using the nightly build, rather than the current release?
The nightly has this commit in it which should fix the issue.
Allan
Hi, do you know when the nightly of SearchPanes will be merged/available to be downloaded with "download builder" so I think a v2.3.3 ? thanks
Ok i've finally found and replicate the problem with live.datatable.net:
If you see my example using firebug you get an error "Uncaught ReferenceError: alert is not defined" (because alert is "blocked" from the live.datatable.net site.
But on my webapp the alert is "DataTables warning: table id=tabella - Requested unknown parameter '1' for row 0, column 1"
Now if you comment "language:" option, no errors in console occurs.
The problem appear only if I call a function ( example: my_custom_func() ) after initilization of the table and inside the funtion i need to operate with table (in this case clear all rows)
Thanks for the test case. The issue is that your table initialisation is async due to the use of the
language.url
option, but yourmy_custom_func()
function is executed synchronously.It issue here has nothing to do with SearchPanes (indeed, although you include the code for SP on the page, it isn't used).
The answer is to use
ready()
to wait for the table to load before you perform any operations on it:https://live.datatables.net/xapilela/6/edit
Allan