Skip to content

Autosave combined with unique: true crashes “Create New” #15126

Description

@robinscholz

Describe the Bug

Image

When a collection has a field with unique: true and autosave is enabled on the collection, the /create route stops working in some specific cases.

Link to the code that reproduces this issue

https://github.com/magicasaservice/payload-autosave-bug

Reproduction Steps

  1. Create new post
  2. Do not fill out anything for the slug, wait for it to autosave
  3. Exit the newly created post
  4. Try creating another post
  5. The screen is now empty, the console has a verbose error:
key not found: error:valueMustBeUnique
key not found: error:followingFieldsInvalid

Which area(s) are affected?

area: ui

Environment Info

–

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugarea: uiRelated to the admin panel.stalestatus: needs-triagePossible bug which hasn't been reproduced yet

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions