Skip to content

Autosave overwriting with missing content (SQLite) #8597

@mikecebul

Description

@mikecebul

Link to reproduction

https://github.com/mikecebul/test-revisions

Environment Info

Binaries:
  Node: 20.14.0
  npm: 10.7.0
  Yarn: N/A
  pnpm: 9.11.0
Relevant Packages:
  payload: 3.0.0-beta.111
  next: 15.0.0-canary.173
  @payloadcms/email-nodemailer: 3.0.0-beta.111
  @payloadcms/graphql: 3.0.0-beta.111
  @payloadcms/live-preview: 3.0.0-beta.111
  @payloadcms/live-preview-react: 3.0.0-beta.111
  @payloadcms/next/utilities: 3.0.0-beta.111
  @payloadcms/plugin-cloud: 3.0.0-beta.111
  @payloadcms/plugin-form-builder: 3.0.0-beta.111
  @payloadcms/plugin-nested-docs: 3.0.0-beta.111
  @payloadcms/plugin-redirects: 3.0.0-beta.111
  @payloadcms/plugin-search: 3.0.0-beta.111
  @payloadcms/plugin-seo: 3.0.0-beta.111
  @payloadcms/richtext-lexical: 3.0.0-beta.111
  @payloadcms/translations: 3.0.0-beta.111
  @payloadcms/ui/shared: 3.0.0-beta.111
  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

When you create items in a collection or global such as pages, it auto saves without changes being made. It always shows changed instead of draft or published. This happens so quickly that it will overwrite a page with content with none or partial content. Refreshing or reverting to published content restores it.

Reproduction Steps

I made a repo to show it happen on Vercel with Turso, but this actually occurs in development as well.

  1. create a new beta install with the website template
  2. build and start
  3. begin to create pages in the pages collection (notice it says "changed" instead of "published")
  4. go back to a page you created. (often the page autosaves overwriting the title as null)
  • some pages will be overwritten as null just by opening them

I double checked and this occurs without the duplicate @libsql/client package installed that's required for Turso to work on Vercel.

Adapters and Plugins

db-sqlite

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions