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
727 stars 33 forks source link

Migration Issue - There was an error while loading site data. - Unexpected Error #142

Closed knmurphy closed 1 month ago

knmurphy commented 1 month ago

Hi! 👋🏻 😄 Thank you to all who contribute to making this awesome project! Once I get more familiar with it I hope I can contribute more directly to its success.

At the moment, I'm stuck migrating to Sveltia CMS from DecapCMS. I was able to migrate from git-gateway to github oauth but after I authorize and get redirected I ended up with this error:

There was an error while loading site data Unexpected Error

Screen Shot 2024-05-13 at 2 54 08 PM

My developer console shows this error:

Cannot read properties of null (reading sveltia-cms.js:266 'ref') undefined Fm @ sveltia-cms.js:266

Screen Shot 2024-05-13 at 2 59 56 PM

Here is the config.yml block for auth

# The backend option specifies how to access the content for your site
backend:
  name: github
  repo: <MY/REPO> # My repo path, removed for this post
  # optional, defaults to master
  branch: master # The branch to update 

I looked through the issues and discussions but couldn't work around it on my own. Any idea what might solve it? Thanks!

kyoshino commented 1 month ago

@knmurphy Thanks for reporting the issue! I’m checking it now.

kyoshino commented 1 month ago

Found an issue your config file:

https://github.com/knmurphy/intuicion-cafe/blob/2cc9def31df334c4715a49e29a419fbcfc732006/admin/config.yml#L6

knmurphy/intuicion.cafe has to be knmurphy/intuicion-cafe. (Replace a dot with a hyphen)

I’ll fix my code anyway, but you’ll still get an error until the repo name is fixed 😉

knmurphy commented 1 month ago

Wow, thank you for this! I am trying the fix now 👍🏻

kyoshino commented 1 month ago

Just shipped v0.27.1 to fix an error on my side!

knmurphy commented 1 month ago

You are correct, that fixed it! Thanks so much.

I am really excited to dig into this, I have been so frustrated with netlifycms in the past so I'm excited to find an active replacement 🙌🏻