danurbanowicz / eleventy-sveltia-cms-starter

A template for building a fast Eleventy blog with Sveltia CMS, for deployment to Netlify
https://eleventy-sveltia-cms-starter.netlify.app
MIT License
15 stars 0 forks source link

Error when editing or creating a post #4

Closed jerefrer closed 1 month ago

jerefrer commented 1 month ago

Hi there,

Thanks a lot for making it so simple to wire together all these great tools :)

I clicked the button to deploy to Netlify, followed the instructions on the README to configure Netlify and Github, and soon enough could access the admin page and everything seems to work well. I can create and edit pages, authors, and update the settings. So far so good.

However when I click on a post to edit it, or try to create a new one, I get this error:

Uncaught (in promise)
TypeError: o.map is not a function
    at ng (sveltia-cms.js:278:2593)
    at OK.t.$$.update (sveltia-cms.js:663:207488)
    at te (sveltia-cms.js:1:8888)
    at new PK (sveltia-cms.js:663:207573)
    at Gt (sveltia-cms.js:1:4333)
    at Array.Hx (sveltia-cms.js:663:245779)
    at ZS (sveltia-cms.js:663:233984)
    at Yx (sveltia-cms.js:663:250002)
    at te (sveltia-cms.js:1:8935)
    at new xg (sveltia-cms.js:663:253488)

I tried to do this locally, thinking that the error would be more helpful, but it is exactly the same.

Any idea what might be wrong?

danurbanowicz commented 1 month ago

I'm unable to look at this right now but it seems like it could be an issue with the tags list widget in the posts collection. You could try disabling that widget in your CMS config file and see if the error persists. Either way I will be able to take a look in a day or two.

danurbanowicz commented 1 month ago

This should now be fixed in https://github.com/danurbanowicz/eleventy-sveltia-cms-starter/pull/5

The post authors relation widget search_fields option is no longer supported by Sveltia CMS and was causing the error.

Closing this now but let me know if the issue persists and I will re-open.

jerefrer commented 1 month ago

Hey that was fast :)

I confirm that the issue is fixed, thanks a lot! 🎉 🙏