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

field with attribute widget list blocks content creation #126

Closed loicginoux closed 3 months ago

loicginoux commented 3 months ago

Given this config:

collections:
    - name: "posts"
      i18n: true
      label: "Blog Posts"
      folder: "src/content/blog"
      create: true
      delete: true
      fields:
          - label: "Tags"
            name: "tags"
            widget: "list"

I should be able to create a new post with a tag list, but I have an error when saving the new post that blocks me from creating content.

Screenshot 2024-03-25 at 23 17 36

It does not happen when duplicating an existing post, and it is definitely an issue with this field because it works when I have other type of fields (string, boolean, text, object, etc..)

kyoshino commented 3 months ago

Thanks for reporting, @loicginoux! Will take a look now.

kyoshino commented 3 months ago

I guess you have i18n enabled. Can I see the i18n configuration?

kyoshino commented 3 months ago

Well, maybe this is your current config: https://github.com/loicginoux/SDprices-blog2/blob/main/public/admin/config.yml

I don’t get any error with or without the tags field. 🤔

kyoshino commented 3 months ago

Okay, I think this is the same issue as #91. It’s fixed in v0.9.7 but you’re using v0.9.0. Remove @0.9.0 to upgrade to the latest version, then your problem should be solved!

<script src="https://unpkg.com/@sveltia/cms/dist/sveltia-cms.js" type="module"></script>
loicginoux commented 3 months ago

Yes this is it, thank you and sorry for duplicate issue, I should have search more on closed issues. Nice work btw, keep it up !