decaporg / decap-cms

A Git-based CMS for Static Site Generators
https://decapcms.org
MIT License
17.84k stars 3.04k forks source link

Restore from cache retrieval failed after closed page by accident #6989

Open demshy opened 10 months ago

demshy commented 10 months ago

Describe the bug This issue was caught here: https://github.com/decaporg/decap-cms/discussions/6964 When retrieving values from backup, the page gets reloaded after a while, reverting to the values previously saved.

To Reproduce

  1. Open an existing entry
  2. Change some values
  3. Reload page
  4. Choose to retrieve from backup when prompted
  5. Observe that the page reloads after a while

Expected behavior The form should keep the values that were retrieved from backup and should not refresh.

Screenshots https://github.com/decaporg/decap-cms/assets/19568230/84e22190-67de-48af-86ff-457fd44dfc94

Applicable Versions:

CMS configuration

local_backend: true

backend:
  name: git-gateway
  branch: main
  squash_merges: true

publish_mode: editorial_workflow
media_folder: static/media/uploads
public_folder: /media/uploads

slug:
  encoding: ascii
  clean_accents: true

i18n:
  structure: multiple_files
  locales: [en, de, si]

collections:
  - name: posts
    label: Posts
    label_singular: post
    folder: content/posts
    create: true
    slug: "{{slug}}"
    i18n: true
    editor:
      preview: false

    fields: [
      {name: title, widget: string, i18n: true},
      {name: description, widget: text, i18n: true},
      {name: image, widget: image, i18n: duplicate, required: false},
      {name: body, widget: markdown, i18n: true},
    ]