E11000 duplicate key & validate errors

default discord avatar
shisue
last month
2

Hi,



I am getting errors I was not getting just a few hours ago, and reverting my repo to a working stage is still giving me these errors. I am not sure what can be the issue.



This error, for example, I get when I attempt to create a user:



And I am also getting errors with validate issues for collection relationship fields, but there is no validation happening. I commented out all of them to test.



I reverted back to the initial version of the repo, 35 commits ago. I commented out all hooks, everything. The error still persists, I'm really not sure what is going on:

  • discord user avatar
    jarrod_not_jared
    Payload Team
    4 weeks ago

    Do you have a field that has unique set?

  • default discord avatar
    shisue
    4 weeks ago

    I did not, and it went away after I deleted all collections on the mongoDB portal, as well as _config. I think for some reason I added unique and removed at some point in the past, but running yarn generate:types was not updating it

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.