payloadcms / payloadcms/payload
denying access in query presets results in error 500
Open
@GermanJablo is already working on this.
Since Mar 3, 2026.
Bug
stale
- Dominant language
- TypeScript
- Stars
- 44.8k
- Forks
- 4.2k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 53
Description
Describe the Bug
When denying access to the query presets the "select preset" button does not disappear. Upon clicking it the popup to select a query preset opens empty and then closes. The console prints the following error:
POST /admin/collections/posts?limit=10 500 in 374ms
⨯ Error: not-found
at renderListView (packages\next\src\views\List\index.tsx:81:10)
at renderListHandler (packages\next\src\views\List\handleServerFunction.tsx:135:40)
at async Server.<anonymous> (test\dev.ts:125:4)
79 |
80 | if (!permissions?.collections?.[collectionSlug]?.read) {
> 81 | throw new Error('not-found')
| ^
82 | }
83 |
84 | const query = queryFromArgs || queryFromReq {
digest: '339678479'
}
Link to the code that reproduces this issue
https://github.com/tylkomat/payload/tree/bug-query-presets-access-denied
Reproduction Steps
Visit posts collection and click on "select preset".
Which area(s) are affected? (Select all that apply)
area: core, area: ui
Environment Info
Payload: 3.35.1
NextJs: 15.3.0
Nodejs: 20.12.2
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.
Assessment
This issue has not been assessed yet.