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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JavaScript error on save

jonnyowenpowell opened this issue · comments

Hey!

Since v0.21.2 I see the following message in the console when saving a collection, and the page becomes unresponsive.

sveltia-cms.js:627 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '_default')
    at t.$$.update (sveltia-cms.js:627:238808)
    at PT (sveltia-cms.js:1:5502)
    at Ze (sveltia-cms.js:1:5217)

My config is:

backend:
  name: github
  repo: jonnyowenpowell/<repo name>
  branch: main
site_url: http://localhost:1313
logo_url: /img/logo.png
media_folder: static/img
public_folder: /img
search: true
collections:
  - name: blog
    label: Blog
    folder: 'content/blog'
    create: true
    editor:
      preview: false
    fields:
      - { label: 'Title', name: 'title', widget: 'string' }
      - { label: 'Publish Date', name: 'date', widget: 'string' }
      - { label: 'Description', name: 'description', widget: 'string' }
      - { label: 'Author', name: 'author', widget: 'string' }
      - { label: 'Body', name: 'body', widget: 'markdown' }

Thanks for reporting! Just fixed the issue and shipped v0.21.5 🙇🏼 I’ll start writing Playwright tests soonish.

Nice one, thanks very much!
I see you're not accepting contributions right now, and I understand why! However, if you do start looking for contributors at some point, I'd be happy to chip in - I'll check the readme periodically to see if you announce anything like that 👍

Thanks! I’ll start accepting contributions once the Svelte 5 migration is done. It will happen as soon as the next month.