Server side using nodejs error on search with client side columns
Server side using nodejs error on search with client side columns
I'm using nodeJS server side processing. My tables has two columns that are both set to 'searchable: false' and 'orderable: false' but when searching or ordering nodeJS errors with the following: 'UnhandledPromiseRegectionWarning: Error: Unknown field: empty (index 0)'
I can see the request being sent has 'columns[0][searchable]: false' and 'columns[0][orderable]: false' in the data so it appears client-side its ok but server side seems to be ignoring that.
Has anyone experienced this with nodejs? and any ideas on a solution?
Answers
Have you also changed the default
order
option, which will default to order on column index 0 (theorderable
controls the user's ability to order the column, not the API's).Allan
Yes I have this to set the initial order by a date column.
order: [
[4, 'desc']
],
Thanks. Could you either (preferably) give me a link to the page showing the issue, or use the debugger on your page just after the error occurs?
Allan
Thanks Allan. The page isn't public facing and the data is sensitive. Anyway of getting the debug to you without it being available online?
I've been working on a new version of the debugger which secures the data it uploads a bit more - to run this version of the debugger open your browser's console on the page showing the issue and run:
Then click the "Upload data" option and confirm you want to upload the data. Only myself and Colin will be able to see it (i.e. the two employees of SpryMedia). We'll need the six letter debug code it gives you.
Thanks,
Allan
Hi Allan, the code is ajimuz
Ordering the columns is working. Its just the search that is failing. Below is the nodeJS error: