-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed as not planned
Closed as not planned
Copy link
Labels
Description
When a branch is not specified in config.yml, Netlify defaults to using master branch of repo. Due to recent name change of master branch to main , this creates an API_ERROR: cannot find branch in CMS when publishing entries and 404 errors on initial CMS load.
To Reproduce
- Create a new repo and project utilizing Netlify CMS,
netlify-cms-app
. I used gatsby.js for my project. - Setup config.yml in project without specifying branch name under:
backend:
name: github
repo: org/repo
- Publish a new entry in Netlify CMS
Expected behavior
Initial load of localhost:8000/admin results in 404 (that are handled well). Main problem is introduced when publishing CMS entries. API_ERROR occurs.
Applicable Versions:
- Netlify CMS version: 2.12.25
- Git provider: Github
- Node.JS version: 13.13.0
CMS configuration
backend:
name: github
repo: jsl15c/repo
media_folder: static/assets
public_folder: /static
collections:
- name: Product
label: Product
folder: product
create: true
fields:
- { name: name, label: Name }
- { label: Description, name: description, widget: text }
- { label: Price, name: price, widget: number }
m1g