In the admin UI, tab posts: trying to filter, using field Blog. The list of blogs should contain blogs.
Currently, the list is empty

Go to the admin UI, open posts, and try to filter, using field Blog.
Version: "keystone": "^0.3.16"
Log:
GET /keystone/posts 200 1100.208 ms
API Error (database error):
{ [MongoError: Failed to parse: { find: "pages", filter: { __t: "Blog" }, sort: { note: 1 }, limit: "10" }. 'limit' field must be numeric.]
name: 'MongoError',
message: 'Failed to parse: { find: "pages", filter: { __t: "Blog" }, sort: { note: 1 }, limit: "10" }. \'limit\' field must be numeric.',
waitedMS: 0,
ok: 0,
errmsg: 'Failed to parse: { find: "pages", filter: { __t: "Blog" }, sort: { note: 1 }, limit: "10" }. \'limit\' field must be numeric.',
code: 9 }
Unhandled rejection MongoError: Failed to parse: { find: "pages", filter: { __t: "Blog" }, sort: { note: 1 }, limit: "10" }. 'limit' field must be numeric.
at Function.MongoError.create (/home/www/site/node_modules/mongodb-core/lib/error.js:31:11)
at queryCallback (/home/www/site/node_modules/mongodb-core/lib/cursor.js:200:36)
I can confirm this behaviour.
Digging around it seems that https://github.com/keystonejs/keystone/blob/v0.3.x/admin/api/list.js#L27 is where it's being accepted as a string.
@moret, I have fixed this bug manually in the node_modules, but I don't think, that my way of fixing - is the best way :/
Anyway:
commented 26 days ago ...
I think this will be fixed in 0.4
@maxkoryukov you're absolutely right, I commented just to keep the reference.
@morenoh149 you misunderstood my comment, I wished to point out where in the codebase it seems to be the issue, not merely subscribe to the conversation. If you feel it doesn't add anything I will refrain from doing so in the future.
@moret thanks for pointing out where the problem is, I tried to fix it. Would be nice if someone can confirm it fixed.
@wmertens great. I changed my package.json to "keystone": "[email protected]:keystonejs/keystone.git#a0d9a42e1c84b7987cbc9ae62eef8a1153d3bd25", removed and reinstalled node_modules and tested. I can confirm it's fixed, thank you a lot!
@moret awesome, I'll close this then and ask @jed to please push a new v0.3 patch release :)
Most helpful comment
@moret awesome, I'll close this then and ask @jed to please push a new v0.3 patch release :)