MongoError: exception: the limit must be positive #19

Closed
mayaa6 opened this Issue Jul 23, 2014 · 4 comments

Projects

None yet

2 participants

@mayaa6
mayaa6 commented Jul 23, 2014

hello, when the client send a query like this:
draw:1
columns[0][data]:0
columns[0][name]:
columns[0][searchable]:true
columns[0][orderable]:false
columns[0][search][value]:
columns[0][search][regex]:false
columns[1][data]:1
columns[1][name]:
columns[1][searchable]:true
columns[1][orderable]:true
columns[1][search][value]:
columns[1][search][regex]:false
columns[2][data]:2
columns[2][name]:
columns[2][searchable]:true
columns[2][orderable]:true
columns[2][search][value]:
columns[2][search][regex]:false
columns[3][data]:3
columns[3][name]:
columns[3][searchable]:true
columns[3][orderable]:true
columns[3][search][value]:
columns[3][search][regex]:false
columns[4][data]:4
columns[4][name]:
columns[4][searchable]:true
columns[4][orderable]:true
columns[4][search][value]:
columns[4][search][regex]:false
columns[5][data]:5
columns[5][name]:
columns[5][searchable]:true
columns[5][orderable]:true
columns[5][search][value]:
columns[5][search][regex]:false
columns[6][data]:6
columns[6][name]:
columns[6][searchable]:true
columns[6][orderable]:true
columns[6][search][value]:
columns[6][search][regex]:false
columns[7][data]:7
columns[7][name]:
columns[7][searchable]:true
columns[7][orderable]:true
columns[7][search][value]:
columns[7][search][regex]:false
columns[8][data]:8
columns[8][name]:
columns[8][searchable]:true
columns[8][orderable]:true
columns[8][search][value]:
columns[8][search][regex]:false
columns[9][data]:9
columns[9][name]:
columns[9][searchable]:true
columns[9][orderable]:false
columns[9][search][value]:
columns[9][search][regex]:false
order[0][column]:1
order[0][dir]:desc
order[1][column]:2
order[1][dir]:asc
start:0
length:10
search[value]:
search[regex]:false
_:1406133379280

server replies with the following error:
{ [MongoError: exception: the limit must be positive]
name: 'MongoError',
errmsg: 'exception: the limit must be positive',
code: 15958,
ok: 0 }

I cannot find much useful information online, can you help me with it?

P.S. my developing environment is

  1. nodejs 0.10.26
  2. express 4.6.1
  3. mongodb 1.4.7
  4. mongoose 3.8.13
  5. mongoose-datatable 0.2.8
@eherve
Owner
eherve commented Jul 23, 2014

Hi,

Thank you for your feedback,

The new version of DataTable 1.10 changed the set of parameters send to the server processing.
The module is working with the DataTable 1.9 version of the parameter set, so if you want to use it with the 1.10 you need to activate the compatibility mode, see: https://next.datatables.net/manual/server-side under section Legacy.

The DataTable 1.10 version support for this module will come later.

Regards,

@mayaa6
mayaa6 commented Jul 24, 2014

Hello,
Thank you for your response. After I replace Datatables with a lower version, this problem I mentioned ceased. Also I notice that, Mongoose is updated to a 3.x version. 3.x and 2.x mongoose are incompatible. My question is whether mongoose-datatable works on either version of mongoose?
Regards,

@eherve
Owner
eherve commented Jul 30, 2014

Hello,

Sorry for the late reply....
You can use the version 1.10 of DataTable if you activate the legacy server side parameter set.

Regarding mongoose, sorry I haven't try the new version yet... But I use the aggregation functionality that is more mongodb than mongoose feature so I think it will work.
I'll try it as soon as possible and get back to you.

Regards,

@eherve
Owner
eherve commented Aug 24, 2014

Hi,

Ok I misunderstood your question... No the plugin does not work with mongoose 2.x, you need at least the 3.8.0 version.
Sorry

Regards,

@eherve eherve closed this Aug 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment