Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.
I have a location collection. It has only couple of fields. One of the fields is coordinates type point.
If I set this field as localized,
In BeforeChangeHook I am unable to set the [long, lat]
The error comes from MongoDB: ERROR: MongoServerError: Can't extract geo keys ...
If I remove the localized attribute, it works fine.
Reproduction Steps
create a collection.
have one field as type point.
try to update this field on save using BeforeChangeHook
If it is localized, MongoDB will give error.
Link to reproduction
No response
Payload Version
3.0.0-beta.45
Node Version
21.6.2
Next.js Version
15.0.0-rc.0
Describe the Bug
I have a location collection. It has only couple of fields. One of the fields is coordinates type point. If I set this field as localized, In BeforeChangeHook I am unable to set the [long, lat] The error comes from MongoDB: ERROR: MongoServerError: Can't extract geo keys ... If I remove the localized attribute, it works fine.
Reproduction Steps
create a collection. have one field as type point. try to update this field on save using BeforeChangeHook If it is localized, MongoDB will give error.
Adapters and Plugins
I am using MongoDB