Skip to content

[Access] Paths cannot be queried #2606

@KomlevDm

Description

@KomlevDm

Link to reproduction

https://github.com/KomlevDm/payload/tree/access-query-issue

To Reproduce

  1. go to test/_community/collections/Media/index.ts
  2. add query to MediaCollection.access.read (test/_community/collections/Media/prod.ts and test/_community/collections/Media/published.ts)
  3. start dev server
  4. open http://localhost:3000/admin/collections/media
  5. page is broken
  6. get error 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 to 1.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 to feat: 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.

image

image

image

image

image

Payload Version

1.7.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs-triagePossible bug which hasn't been reproduced yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions