Closed mikecebul closed 1 month ago
I think the problem was related to incorrect timestamps for versions which we fixed in this PR https://github.com/payloadcms/payload/pull/8646
After this change we were unable to reproduce this error. We'll do another release in the next day or so and you can confirm.
This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.
Link to reproduction
https://github.com/mikecebul/versions-sqlite
Environment Info
Binaries: Node: 20.14.0 npm: 10.7.0 Yarn: N/A pnpm: 9.7.0 Relevant Packages: payload: 3.0.0-beta.113 next: 15.0.0-canary.173 @payloadcms/graphql: 3.0.0-beta.113 @payloadcms/next/utilities: 3.0.0-beta.113 @payloadcms/translations: 3.0.0-beta.113 @payloadcms/ui/shared: 3.0.0-beta.113 react: 19.0.0-rc-3edc000d-20240926 react-dom: 19.0.0-rc-3edc000d-20240926 Operating System: Platform: darwin Arch: x64 Version: Darwin Kernel Version 23.6.0: Mon Jul 29 21:13:00 PDT 2024; root:xnu-10063.141.2~1/RELEASE_X86_64 Available memory (MB): 8192 Available CPU cores: 8
Describe the Bug
I created issue #8597 and realized it should be redone properly.
With SQLite only, when versions.drafts.autosave === true, it never says published, only changed. This prevents the ability to unpublish.
Since the autosave is getting triggered when it shouldn't I am seeing the collection data saved as null when it first loads. This happens because the data hasn't loaded yet and the autosave is triggered. I'm unable to come up with a simple reproduction because using single field and throttling to 3G doesn't trigger it. But setting the autosave.interval: 100, using many fields, a free Vercel server, and Turso does cause this issue repeatedly.
Reproduction Steps
To see the bug you cannot use the test suite from the monorepo. I've tried and for some reason it works as expected as you can see here. So follow the steps below:
npx create-payload-app@latest
You can also just use my reproduction.
Adapters and Plugins
db-sqlite