decap-cms: Failed to load entries: API_ERROR: Not Found
Describe the bug
I’m running a gatsby v2 site hosted on netlify. I’m able to build and deploy the site and I’m able to login to the cms. I get the error “Failed to load entries: API_ERROR: Not Found” when I log in though and none of the collection items show up even though there are markdown files that work on the front end of the site.
To Reproduce
I’m not sure really. Expected behavior
I login and see all the collection items and can edit them. Screenshots
Applicable Versions:
- Netlify CMS version: 2.1.1
- Git provider: Gitlab
- OS: MacOs 10.13
- Browser version: Chrome 69
- Node.JS version:
CMS configuration
backend: name: git-gateway branch: master
media_folder: static/img public_folder: /img
collections:
-
name: “blog” label: “Blog” folder: “src/pages/blog” create: true slug: “{{year}}-{{month}}-{{day}}-{{slug}}” fields:
- {label: “Template Key”, name: “templateKey”, widget: “hidden”, default: “blog-post”}
- {label: “Title”, name: “title”, widget: “string”}
- {label: “Publish Date”, name: “date”, widget: “datetime”}
- {label: “Description”, name: “description”, widget: “text”}
- {label: “Body”, name: “body”, widget: “markdown”}
- {label: “Tags”, name: “tags”, widget: “list”}
-
name: “pages” label: “Pages” files:
- file: “src/pages/about/index.md”
label: “About”
name: “about”
fields:
- {label: “Template Key”, name: “templateKey”, widget: “hidden”, default: “about-page”}
- {label: “Title”, name: “title”, widget: “string”}
- {label: “Body”, name: “body”, widget: “markdown”}
- file: “src/pages/products/index.md”
label: “Products Page”
name: “products”
fields:
- {label: “Template Key”, name: “templateKey”, widget: “hidden”, default: “product-page”}
- {label: Title, name: title, widget: string}
- {label: Image, name: image, widget: image}
- {label: Heading, name: heading, widget: string}
- {label: Description, name: description, widget: string}
- {label: Intro, name: intro, widget: object, fields: [{label: Heading, name: heading, widget: string}, {label: Description, name: description, widget: text}, {label: Blurbs, name: blurbs, widget: list, fields: [{label: Image, name: image, widget: image}, {label: Text, name: text, widget: text}]}]}
- {label: Main, name: main, widget: object, fields: [{label: Heading, name: heading, widget: string}, {label: Description, name: description, widget: text}, {label: Image1, name: image1, widget: object, fields: [{label: Image, name: image, widget: image}, {label: Alt, name: alt, widget: string}]}, {label: Image2, name: image2, widget: object, fields: [{label: Image, name: image, widget: image}, {label: Alt, name: alt, widget: string}]}, {label: Image3, name: image3, widget: object, fields: [{label: Image, name: image, widget: image}, {label: Alt, name: alt, widget: string}]}]}
- {label: Testimonials, name: testimonials, widget: list, fields: [{label: Quote, name: quote, widget: string}, {label: Author, name: author, widget: string}]}
- {label: Full_image, name: full_image, widget: image}
- {label: Pricing, name: pricing, widget: object, fields: [{label: Heading, name: heading, widget: string}, {label: Description, name: description, widget: string}, {label: Plans, name: plans, widget: list, fields: [{label: Plan, name: plan, widget: string}, {label: Price, name: price, widget: string}, {label: Description, name: description, widget: string}, {label: Items, name: items, widget: list}]}]}
- file: “src/pages/about/index.md”
label: “About”
name: “about”
fields:
Additional context
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 16 (6 by maintainers)
Commits related to this issue
- fix bug: Failed to load entry: API_ERROR: Not Found(https://github.com/netlify/netlify-cms/issues/1741#issuecomment-437033253) — committed to papan01/gatsby-starter-papan01 by deleted user 5 years ago
I did have the same problem. It seems that this happens when the collection is empty, which is a little bit confusing. I published one collection item an the error message was gone! 😃
Of course I immediately solved this after posting this issue! I had to go to netlify.com -> site settings -> services and then click enable git gateway.
A better error message would be helpful in this case.
We’ll probably need to port https://github.com/netlify/netlify-cms/pull/1209 and https://github.com/netlify/netlify-cms/pull/1295 over to GitLab (and BitBucket). Maybe we can just pull it to the top-level
implementation.js
file.I’ll assign this to myself unless somebody else wants it.
@imcodingideas You can find enable git gateway under settings > identity app.netlify.com/sites/your-site-name/settings/identity