-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Error related to pagination limit when join field is set. #8707
Comments
This appears to be resolved in 114 |
@energee I am trying to follow but struggling to. Can you provide a screenshot of the view you are experiencing this in? |
Screen.Recording.2024-10-16.at.3.22.34.PM.mov |
It seems like i can adjust the pagination but when i navigate to: /admin/collection/[collection-slug] and payload retrieves the limit from mongoDB, it fails (looks like its getting a string?) |
I am also getting this error.
|
Try to update to v3.0.0-beta.121 or later where #8913 is fixed. The error message seems the same. |
From what I can see so far, it appears to be resolved, running beta.123 |
I'm still seeing thig even in v3.0.0-beta.124.
It works on one collection, but does not work on the other. |
@HriBB you might want to try clearing out your payload-preferences table, it looks like the config is being sanitized on its way INTO the database so it won't go away until that is reset. |
Thanks @energee! That solved the problem ;) |
This issue has been automatically locked. |
Link to reproduction
No response
Environment Info
Node: 22.9.0
npm: 10.8.3
Yarn: 1.22.22
pnpm: 9.10.0
Relevant Packages:
payload: 3.0.0-beta.113
next: 15.0.0-canary.173
@payloadcms/db-mongodb: 3.0.0-beta.113
@payloadcms/graphql: 3.0.0-beta.113
@payloadcms/next/utilities: 3.0.0-beta.113
@payloadcms/richtext-lexical: 3.0.0-beta.113
@payloadcms/translations: 3.0.0-beta.113
@payloadcms/ui/shared: 3.0.0-beta.113
react: 19.0.0-rc-3edc000d-20240926
react-dom: 19.0.0-rc-3edc000d-20240926
Describe the Bug
Error: invalid argument to $limit stage: Expected a number in: $limit: "10"
Once pagination is set on the collection view, the page fails due to this error.
The limit and other arguments do not get set on the URL.
When i manually set a limit argument on the url eg "?limit=100", it prevents this error.
I don't think this error was present in beta 111.
Reproduction Steps
This occurs when there is a join field on the collection view being displayed.
Use the "per page" pagination, which subsequently should set the limit argument on the URL.
Adapters and Plugins
db-mongodb
The text was updated successfully, but these errors were encountered: