The website is built using Gatsby with Netlify CMS in Bitbucket. The error shows when I tried to change something on the custom page using the Netlify CMS (Live), but works perfectly on the local setup. This confuses me and I don't know what and why is that happening.
Here's my config.yml
backend:
name: bitbucket
repo: repo-name
branch: master
auth_type: implicit
app_id: app-id
commit_messages:
create: "Create {{collection}} “{{slug}}”"
update: "Update {{collection}} “{{slug}}”"
delete: "Delete {{collection}} “{{slug}}”"
uploadMedia: "[skip ci] Upload “{{path}}”"
deleteMedia: "[skip ci] Delete “{{path}}”"
local_backend: true
publish_mode: editorial_workflow
media_folder: static/img
public_folder: /img
(Skipped some because it is too long but here is the setup of the custom page)
- name: "pages"
label: "Pages"
label_singular: "Page"
create: true
files:
- file: "src/pages/resources/i-mop-xl-operator-resources.md"
label: "i-mop xl operator resources"
name: "i-mop xl operator resources"
fields:
- {
label: "Template Key",
name: "templateKey",
widget: "hidden",
default: "i-mop-xl-operator-resources",
}
- { label: Title, name: title, widget: string }
- { label: Heading, name: heading, widget: string }
- { label: Description, name: description, widget: string }
- {
label: "Seo Description",
name: "seodescription",
widget: "string",
}
- { label: "Seo Keyword", name: "seokeyword", widget: "string" }
- {
label: "Seo Title",
name: "seotitle",
widget: "string",
required: false,
}
And the error is saying
P.S this is only happening on the new pages that I've created.
So I've found the solution to this and I think it is pretty simple. The name should not have a blank space. From this:
- file: "src/pages/resources/i-mop-xl-operator-resources.md"
label: "i-mop xl operator resources"
name: "i-mop xl operator resources"
To this:
- file: "src/pages/resources/i-mop-xl-operator-resources.md"
label: "i-mop xl operator resources"
name: "i-mop-xl-operator-resources"