NetlifyCMS "Failed to load entry: API_ERROR: Not Found"

Hello everyone.
Heard about NetlifyCMS sometimes ago and decided to try it out recently.

I’m trying to setup NetlifyCMS on my blog built on Hugo.
I’ve read the docs and followed all instructions. After deploying, I got this error when I visited the admin page:

Does this affect it in any way?
I really don’t understand how this works yet, still trying to learn the process :slight_smile: Hoping to get a hint from the community.

Here’s the blog: https://www.bolajiayodeji.com
Thank you.

Looks like you’re using the git-gateway backend without having Git Gateway enabled in your Netlify Identity settings.

You can find enable git gateway under settings > identity
app.netlify.com/sites/ your-site-name /settings/identity

1 Like

I have Git Gateway enabled already, see the screenshot below:

Whatelse should I check?

Does your collection have a title field, or an identifier_field set? At this point it might be useful to share the contents of your config.yml

2 Likes

Here is the config: https://github.com/BolajiAyodeji/bolajiayodeji.com/blob/master/public/admin/config.yml

1 Like

Yes it does.
My blog is open sourced here: https://github.com/BolajiAyodeji/bolajiayodeji.com

As requested, here is the contents of my config.yml

backend:
  name: git-gateway
  accept_roles:
    - admin
    - editor
  branch: master
  site_url: https://www.bolajiayodeji.com
  logo_url: https://res.cloudinary.com/iambeejayayo/image/upload/v1547954566/fav-500.png

publish_mode: editorial_workflow

media_folder: "img/uploads"

collections:
  - name: "blog" # Used in routes, e.g., /admin/collections/blog
    label: "article" # Used in the UI
    folder: "/contents" # The path to the folder where the documents are stored
    create: true # Allow users to create new documents in this collection
    slug: "{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
    fields: # The fields for each document, usually in front matter
      - {label: "Title", name: "title", widget: "string"}
      - {label: "Type", name: "post", widget: "string"}
      - {label: "Publish Date", name: "date", widget: "datetime"}
      - {label: "Tags", name: "tags", widget: "array"}
      - {label: "Body", name: "body", widget: "markdown"}     

Kindly ignore the Tags field, tried the array widget and found out that it didn’t work, wanted to setup a field to receive tags for each post which is in an array form in Hugo. Once this is fixed, I’ll ask on the right way to do this.
Thank you for your time.

Your folder is called content not contents as in your config. You can remove the leading / also.

1 Like

Alright, thank you.
I’ll fix this now

But even before I update the posts directory, I still experienced the API error

Are you still getting the same error after you fixed the collections location (folder)?

1 Like

No, It’s fixed now.
I can see all my posts and the error is gone.
Thank you so much for your time.

Should I create a new question for the Array of tags or ask here?

Better to start a new question :grin:

2 Likes