sveltia / sveltia-cms

Alternative to Netlify/Decap CMS. Fast, lightweight, Git-based headless CMS. Modern UX, first-class i18n support, open source & free. Made with Svelte.
MIT License
726 stars 33 forks source link

The backup popup bug #148

Closed CarloBu closed 1 month ago

CarloBu commented 1 month ago

I found the bug in the backup popup logic. It shows up even when the changes are saved. It looks like there is no comparing step with the local backup data of the field and the field data stored at md/yaml/json.

to recreate: go to the created collection field, make changes, save, exit, then open the same field again, and the popup shows up to restore the data, that is already saved. At least this bug is happening in the local environment, I haven't tested it at the cdn yet.

https://github.com/sveltia/sveltia-cms/assets/145860771/a58e97a2-5581-4aea-a1cc-3c4625a2e877

kyoshino commented 1 month ago

The backup is deleted when an entry is saved. Will check why the popup still appears.

CarloBu commented 1 month ago

Oh ok, maybe this is an issue with my environment, I use default Chrome in this situation.

I tried with the minimal setup, I got the same popup.

backend:
  name: github
  repo: your/repo
  branch: main
  base_url: http://localhost:4321
  auth_endpoint: /api/auth

media_folder: /src/assets/imgs
public_folder: /src/assets/imgs

collections:
  - label: test
    name: testField
    folder: src/content/test
    create: true
    fields:
      - label: Test
        name: title
        widget: string
kyoshino commented 1 month ago

Could reproduce the issue with a new entry 😅 Fix on the way.

kyoshino commented 1 month ago

Fixed in v0.29.1 🙇🏼

CarloBu commented 1 month ago

yep, can confirm, it's now working fine 👍