Blank screen when filtering a collection for certain array values with "equals" instead of "is in"
@JarrodMFlesch is already working on this.
Since Jan 28, 2026.
Assessment
This issue has not been assessed yet.
Description
Describe the Bug
When I try to filter a collection on a property that is a hasMany relation and use the "equals" operator I get a blank screen and the following error:
[Error: Failed query: select distinct "users"."id", "users"."created_at", "users"."created_at" from "users" left join "users_rels" "4f704f54_123f_4661_90e5_71f0edee30e2" on ("users"."id" = "4f704f54_123f_4661_90e5_71f0edee30e2"."parent_id" and "4f704f54_123f_4661_90e5_71f0edee30e2"."path" like $1) left join "interests" "f1c01e26_80fb_4c44_9c38_5b99a8ce7377" on "f1c01e26_80fb_4c44_9c38_5b99a8ce7377"."id" = "4f704f54_123f_4661_90e5_71f0edee30e2"."interests_id" where "4f704f54_123f_4661_90e5_71f0edee30e2"."interests_id" = $2 order by "users"."created_at" desc limit $3
params: interests,2,2,10] {
query: 'select distinct "users"."id", "users"."created_at", "users"."created_at" from "users" left join "users_rels" "4f704f54_123f_4661_90e5_71f0edee30e2" on ("users"."id" = "4f704f54_123f_4661_90e5_71f0edee30e2"."parent_id" and "4f704f54_123f_4661_90e5_71f0edee30e2"."path" like $1) left join "interests" "f1c01e26_80fb_4c44_9c38_5b99a8ce7377" on "f1c01e26_80fb_4c44_9c38_5b99a8ce7377"."id" = "4f704f54_123f_4661_90e5_71f0edee30e2"."interests_id" where "4f704f54_123f_4661_90e5_71f0edee30e2"."interests_id" = $2 order by "users"."created_at" desc limit $3',
params: [Array],
[cause]: [error: invalid input syntax for type integer: "{"2","2"}"] {
length: 152,
severity: 'ERROR',
code: '22P02',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: "unnamed portal parameter $2 = '...'",
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'numutils.c',
line: '616',
routine: 'pg_strtoint32_safe'
}
}
Link to the code that reproduces this issue
https://github.com/jaymaycry/payload-array-filter-issue
Reproduction Steps
- Login and create user
- Create one or two interests and link one to the user
- Go to collection and add a filter "Interests" "equals" and one of the created interests
=> menu dissapears
Which area(s) are affected?
area: ui
Environment Info
Binaries:
Node: 22.22.0
npm: 10.9.4
Yarn: 1.22.22
pnpm: N/A
Relevant Packages:
payload: 3.72.0
next: 15.4.10
@payloadcms/db-postgres: 3.72.0
@payloadcms/drizzle: 3.72.0
@payloadcms/graphql: 3.72.0
@payloadcms/next/utilities: 3.72.0
@payloadcms/richtext-lexical: 3.72.0
@payloadcms/translations: 3.72.0
@payloadcms/ui/shared: 3.72.0
react: 19.2.1
react-dom: 19.2.1
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 25.2.0: Tue Nov 18 21:09:40 PST 2025; root:xnu-12377.61.12~1/RELEASE_ARM64_T6000
Available memory (MB): 32768
Available CPU cores: 10
- Dominant language
- TypeScript
- Stars
- 44.8k
- Forks
- 4.2k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 53
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from payloadcms/payload
-
area: ui Bug status: needs-triage v3
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
payloadcms/payload#18215 · 1 comment ·
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
payloadcms/payload#18163 ·
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
payloadcms/payload#18161 ·
-
area: core Bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
payloadcms/payload#18072 ·
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
payloadcms/payload#18067 · 1 comment ·
All issues in payloadcms/payload
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·