Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.
Binaries:
Node: 20.16.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant Packages:
payload: 3.0.0-beta.108
next: 15.0.0-canary.161
@payloadcms/db-postgres: 3.0.0-beta.108
@payloadcms/email-nodemailer: 3.0.0-beta.108
@payloadcms/graphql: 3.0.0-beta.108
@payloadcms/next/utilities: 3.0.0-beta.108
@payloadcms/plugin-cloud: 3.0.0-beta.108
@payloadcms/plugin-nested-docs: 3.0.0-beta.108
@payloadcms/plugin-seo: 3.0.0-beta.108
@payloadcms/richtext-lexical: 3.0.0-beta.108
@payloadcms/translations: 3.0.0-beta.108
@payloadcms/ui/shared: 3.0.0-beta.108
react: 19.0.0-rc-e4953922-20240919
react-dom: 19.0.0-rc-e4953922-20240919
Operating System:
Platform: win32
Arch: x64
Version: Windows 10 Pro
Available memory (MB): 65459
Available CPU cores: 24
Done in 1.68s.
Describe the Bug
Actual Behaviour
You have a collection and your default search is for the collection id (which is a number field).
If you search for something that is not a number like a string, it throws a runtime error in admin ui.
Unhandled Runtime Error
Error: invalid input syntax for type integer: "NaN"
Expected Behaviour
Even though we are searching for a number, if I enter text the admin UI should not crash and instead silently cast the string to a number (or silently fail otherwise by showing no results).
Temporary workaround
You can change the search term to a string type to avoid this issue:
Link to reproduction
No response
Environment Info
Describe the Bug
Actual Behaviour
You have a collection and your default search is for the collection id (which is a number field). If you search for something that is not a number like a string, it throws a runtime error in admin ui.
Expected Behaviour
Even though we are searching for a number, if I enter text the admin UI should not crash and instead silently cast the string to a number (or silently fail otherwise by showing no results).
Temporary workaround
You can change the search term to a string type to avoid this issue:
Unfortunately, even if you include
id
in above list of searchable fields, it still will throw the error upon searching for a string.Reproduction Steps
Adapters and Plugins
No response