You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have a collection with an array field, and then attempt to sort by it in the list view, it will get stuck loading and throw this error:
Error: Invalid field "" passed to sort()
at model.Query.exec (.../node_modules/mongoose/lib/query.js:4916:13)
at Function.paginate (.../node_modules/mongoose-paginate-v2/dist/index.js:191:26)
at Object.find (.../node_modules/@payloadcms/db-mongodb/src/find.ts:84:30)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at find (.../node_modules/payload/src/collections/operations/find.ts:145:16)
at findHandler (.../node_modules/payload/src/collections/requestHandlers/find.ts:30:20)
Screen.Recording.2024-05-22.at.4.34.58.PM.mov
To Reproduce
Create a collection with a field of type "array" ex.
Link to reproduction
No response
Describe the Bug
If you have a collection with an array field, and then attempt to sort by it in the list view, it will get stuck loading and throw this error:
Screen.Recording.2024-05-22.at.4.34.58.PM.mov
To Reproduce
Payload Version
2.8.2
Adapters and Plugins
db-mongodb
The text was updated successfully, but these errors were encountered: