Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

versions view infinitely loads when localization is not enabled #8289

Closed
PatrikKozak opened this issue Sep 18, 2024 · 1 comment · Fixed by #8293
Closed

versions view infinitely loads when localization is not enabled #8289

PatrikKozak opened this issue Sep 18, 2024 · 1 comment · Fixed by #8293

Comments

@PatrikKozak
Copy link
Contributor

Link to reproduction

No response

Environment Info

payload: 3.0.0-beta.107
next: 15.0.0-canary.104

Describe the Bug

When entering the version view of a document without localization enabled - the page will infinitely load and this error will pop up in the console:

QueryError: The following path cannot be queried: snapshot
    at validateQueryPaths (webpack://payload-monorepo/packages/payload/src/database/queryValidation/validateQueryPaths.ts?cfe4:89:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at locale (webpack://payload-monorepo/packages/payload/src/collections/operations/findVersions.ts?4f03:57:5)
    at VersionsView (webpack://payload-monorepo/packages/next/src/views/Versions/index.tsx?3cad:50:22) {
  status: 400,
  data: [ { path: 'snapshot' } ],
  isPublic: false,
  isOperational: true,
  [cause]: [ { path: 'snapshot' } ]
}

Reproduction Steps

Can reproduce in the versions test suite:

  • pnpm dev versions
  • create new versions post in version-posts collection
  • navigate to the versions tab
  • watch the page load infinitely

Adapters and Plugins

No response

@PatrikKozak PatrikKozak added status: needs-triage Possible bug which hasn't been reproduced yet v3 created-by: Payload team labels Sep 18, 2024
@github-actions github-actions bot removed the status: needs-triage Possible bug which hasn't been reproduced yet label Sep 18, 2024
@PatrikKozak PatrikKozak changed the title Versions view infinitely loads when localization is not enabled versions view infinitely loads when localization is not enabled Sep 18, 2024
JessChowdhury added a commit that referenced this issue Sep 19, 2024
…#8293)

Versions list view should not query `snapshot` unless localization is
enabled.

Closes #8289
@paulpopus
Copy link
Contributor

Looks to be fixed from that PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants