payloadcms / payloadcms/payload

denying access in query presets results in error 500

Open
#12,186 2 comments 1 reaction 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.