Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: The Field title is missing for the collection #2491

Closed
TidyIQ opened this issue Jul 25, 2019 · 4 comments
Closed

Error: The Field title is missing for the collection #2491

TidyIQ opened this issue Jul 25, 2019 · 4 comments

Comments

@TidyIQ
Copy link

TidyIQ commented Jul 25, 2019

Using Gatsby, all I did was install "netlify-cms-app": "^2.9.7" and "gatsby-plugin-netlify-cms": "^4.1.6", added the plugin to gatsby-config.js, then created the following file at static/admin/config.yml:

backend:
  name: test-repo
media_folder: static/img
public_folder: img
collections:
  - name: "navbar"
    label: "Navigation Bar"
    folder: "navbar"
    create: true
    fields:
      - name: "links"
        label: "Links"
        widget: "list"
        fields:
          - { name: "label", label: "Label", widget: "string" }
          - { name: "path", label: "Path", widget: "string" }

When I run gatsby develop and go to http://localhost:8000/admin I get the following error message in console:

 ⛔ The Field title is missing for the collection “navbar”
Netlify CMS tries to infer the entry title automatically, but one couldn't be found for entries of
the collection “navbar”. Please check your site configuration.

That's literally all I've done so it should be easy enough to reproduce the issue. No idea what I've done wrong.

@erquhart
Copy link
Contributor

You need a field named title. The error message could be improved, agreed.

Sent with GitHawk

@TidyIQ
Copy link
Author

TidyIQ commented Jul 25, 2019

Thanks. I'd highly suggest putting in the docs. It's not mentioned anywhere - I literally searched for "title" in the docs and the only hits were for 2 examples that had label: "Title".

@tomrutgers
Copy link
Contributor

@TidyIQ https://www.netlifycms.org/docs/configuration-options/#identifier_field

You can set something other than title, but you have to let the CMS know by setting identifier_field: label.

@ntmk
Copy link

ntmk commented Aug 6, 2019

@TidyIQ This is stated in the docs and the actual page hasn't been updated in a year.
Straight from the docs
Note: Folder collections must have at least one field with the name title for creating new entry slugs.
You can confirm with both the following urls and can also check the history on github to show this has not been recently added.
Website url:
https://www.netlifycms.org/docs/collection-types/
Github Url:
https://github.com/netlify/netlify-cms/blob/master/website/content/docs/collection-types.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants