Keystone-classic: Admin UI autocomplete fails

Created on 23 Mar 2015  ·  4Comments  ·  Source: keystonejs/keystone-classic

I have model A where I have mapped a number as its name. Then model B has reference to A.

If I go to Admin UI and try to filter those rows of B which have reference to A by giving the number, the following error occurs:

{ [CastError: Cast to number failed for value "/4563/i" at path "number"]
  message: 'Cast to number failed for value "/4563/i" at path "number"',
  name: 'CastError',
  type: 'number',
  value: /4563/i,
  path: 'number' }

I haven't had time yet to find out where this error happens.

4.x candidate bug

Most helpful comment

:+1:

All 4 comments

OK, finally more information.

This happens as stated in the original description but also when searching with any Number field. The problem is in List.prototype.getSearchFilters which generates case-insensitive query which is not applicable for numbers.

EDIT: Any Number field means here, that the name is mapped to a number field. The search does not need to have a relationship.

:+1:

Closing out stale issues which predate the Keystone 4 development cycle. If this still affects Keystone 4, please create a new report with further details.

Thanks,
Stennie

Reopening based on comments in #4908.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jacqueslareau picture jacqueslareau  ·  5Comments

josephg picture josephg  ·  4Comments

Twansparant picture Twansparant  ·  5Comments

joernroeder picture joernroeder  ·  5Comments

rigalpatel001 picture rigalpatel001  ·  5Comments