Replies: 2 comments 7 replies
-
Hey @KomlevDm — I can shine some light here for you. Basically, we have implemented query validation, among other things. Your reproduction repo attempts to query on fields that do not exist in your schema. I assume you are injecting fields with Mongoose directly or similar, but those fields are not reflected in your Payload collection config(s). To fix this, you need to make sure that you have fields that reflect anything that you query on. If you don't want them to show up in the admin UI, but you want them to be available to query on, you can set these fields to Regarding the I will convert this to a discussion because everything is functioning as-intended, but I am happy to continue helping! |
Beta Was this translation helpful? Give feedback.
-
I had the same issue, it turned out to be related to a relationship field that had a read access function that returned an invalid query. The error details are quite limited though. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Link to reproduction
https://github.com/KomlevDm/payload/tree/access-query-issue
To Reproduce
test/_community/collections/Media/index.ts
MediaCollection.access.read
(test/_community/collections/Media/prod.ts
andtest/_community/collections/Media/published.ts
)http://localhost:3000/admin/collections/media
The following paths cannot be queried: _prod, _prod, _status, _status
link in test repo
Describe the Bug
Our team has migrated from
1.6.32
to1.7.4
version. And now we get a global problem (400 Bad Request
) in admin panel:The following paths cannot be queried
. We think it's related tofeat: refactors buildQuery to rely on fields instead of mongoose (d187b809d)
in 1.7.0 release. Something very similar was here, but unfortunately it doesn’t fix current issue.Payload Version
1.7.4
Beta Was this translation helpful? Give feedback.
All reactions