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
750 stars 34 forks source link

"0 fields have an error. Please correct them to save the entry" #91

Closed simrikservices closed 6 months ago

simrikservices commented 6 months ago

I am trying to use it with astro js. I get the same error when deployed online on netlify and also locally.

My config file:

local_backend: false

logo_url: /favicon.svg

backend:
    name: "github"
    repo: simrikservices/newsim
    branch: main
    site_domain: simrik.netlify.app
    base_url: https://simrik.netlify.app
    auth_endpoint: oauth
    automatic_deployments: false

media_folder: "public/dynamicimages"
public_folder: "/dynamicyimages"

i18n:
    structure: "multiple_folders"
    locales: ["en", "zh"]
    default_locale: "en"

collections:
    - name: "blogs"
      media_folder: "public/dynamicimages/blogs"
      public_folder: "/dynamicyimages/blogs"
      icon: "brand_awareness"
      i18n: true
      label: "Blog Posts"
      folder: "src/content/blogs"
      create: true
      delete: true
      fields:
          - name: "title"
            widget: "string"
            label: "Post Title"
            i18n: true
          - label: "Draft"
            name: "draft"
            widget: "boolean"
            i18n: "duplicate"
          - label: "Author"
            name: "author"
            widget: "string"
            i18n: "duplicate"
          - label: "Tags"
            name: "tags"
            widget: "list"
            i18n: true
          - label: "Image"
            name: "image"
            widget: "object"
            i18n: true
            fields:
                - { label: Source, name: src, widget: image, i18n: "duplicate" }
                - { label: Alt Text, name: alt, widget: string, i18n: true }
          - label: "Snippet"
            name: "snippet"
            widget: "text"
            i18n: true
          - label: "Publish Date"
            name: "publishDate"
            widget: "datetime"
            format: "YYYY-MM-DD HH:mm"
            i18n: "duplicate"
          - label: "Category"
            name: "category"
            widget: "select"
            options: ["Tutorials", "News", "Reviews", "Frameworks"]
            i18n: "duplicate"
          - name: "body"
            widget: "markdown"
            label: "Post Body"
            i18n: true
kyoshino commented 6 months ago

Thanks for reporting! Checking the issue now.

kyoshino commented 6 months ago

The fix is in! Please reload the CMS and try again.

simrikservices commented 6 months ago

Thank you. I am able to save the record but now (after saving one entry ) even after reloading the UI is unresponsive. Here is the error in the console.

sveltia-cms.js:223 Uncaught (in promise) TypeError: r.match is not a function at sveltia-cms.js:223:8632 at Array.map (<anonymous>) at sveltia-cms.js:223:8607 at Array.map (<anonymous>) at Vw (sveltia-cms.js:223:8570) at t.$$.update (sveltia-cms.js:439:170614) at x (sveltia-cms.js:1:7948) at new HF (sveltia-cms.js:439:170805) at Array.WF (sveltia-cms.js:439:174640) at Ee (sveltia-cms.js:1:810)

kyoshino commented 6 months ago

Thanks again! I don’t know why I didn’t notice the issue earlier but just added the fix to v0.9.7 😅