-
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
Unable to edit existing documents with custom ids as of beta 114 #8848
Comments
I believe you need to set idType to 'uuid' in postgresAdapter() to resolve this. |
we are also encountering this with SQLite which has no |
We're able to work around this issue by hashing our string id into a positive integer. Docs should be updated though if it's indeed not intended to be able to use text for ids. |
Looking in the SQLite package code it does have an idType, the docs needs to be updated to reflect this. |
Thanks! setting |
This issue has been automatically locked. |
Describe the Bug
As of beta 114, I'm no longer able to edit existing documents with a string IDs in the admin. Almost all of my project's collections use custom ids generated with nanoid -- the simple logic of which is included in the linked repository -- and I am able to successfully create new records with custom IDs, but all individual document pages in the admin present with a title of
NaN
and seems to trigger the create new collection route.Everything seems to work as expected in beta 113 or earlier (at least back until 80+).
Link to the code that reproduces this issue
https://github.com/jeffreylouden/payload-uneditable-collections
Reproduction Steps
Which area(s) are affected? (Select all that apply)
db-postgres
Environment Info
payload: 3.0.0-beta.117
next: 15.0.0
@payloadcms/db-postgres: 3.0.0-beta.117
@payloadcms/email-nodemailer: 3.0.0-beta.117
@payloadcms/graphql: 3.0.0-beta.117
@payloadcms/next/utilities: 3.0.0-beta.117
@payloadcms/plugin-cloud: 3.0.0-beta.117
@payloadcms/richtext-lexical: 3.0.0-beta.117
@payloadcms/translations: 3.0.0-beta.117
@payloadcms/ui/shared: 3.0.0-beta.117
react: 19.0.0-rc-65a56d0e-20241020
react-dom: 19.0.0-rc-65a56d0e-20241020
The text was updated successfully, but these errors were encountered: