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

Point type field has issues when using BeforeChangeHook #6810

Open
jomapps opened this issue Jun 17, 2024 · 1 comment
Open

Point type field has issues when using BeforeChangeHook #6810

jomapps opened this issue Jun 17, 2024 · 1 comment
Labels
db-mongodb @payloadcms/db-mongodb status: needs-repro If an issue does not include a reproduction v3

Comments

@jomapps
Copy link

jomapps commented Jun 17, 2024

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

@jomapps jomapps added status: needs-triage Possible bug which hasn't been reproduced yet v3 labels Jun 17, 2024
@AlessioGr AlessioGr added the status: needs-repro If an issue does not include a reproduction label Jun 17, 2024
@github-actions github-actions bot removed the status: needs-triage Possible bug which hasn't been reproduced yet label Jun 17, 2024
@AlessioGr AlessioGr added status: needs-triage Possible bug which hasn't been reproduced yet db-mongodb @payloadcms/db-mongodb labels Jun 17, 2024
@github-actions github-actions bot removed the status: needs-repro If an issue does not include a reproduction label Jun 17, 2024
@AlessioGr AlessioGr added status: needs-repro If an issue does not include a reproduction and removed status: needs-triage Possible bug which hasn't been reproduced yet labels Jun 17, 2024
@JarrodMFlesch
Copy link
Contributor

@jomapps can you please provide a reproduction of this issue? If not we will likely close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
db-mongodb @payloadcms/db-mongodb status: needs-repro If an issue does not include a reproduction v3
Projects
None yet
Development

No branches or pull requests

3 participants