danielkellyio/awake-template

Error on adding Category

Closed this issue · 2 comments

I just deploy the repo into Netlify, its great and I am very impressed. But there is an issue with adding Categories. I can edit 2 existing categories, but when I try to add a new category, I receive this error:

Failed to persist entry: Error: Collection must have a field name that is a valid entry identifier, or must have identifier_field set

error

I should mention that this does NOT happen when adding new post.

Regards

Well, I could manage to do it by adding the md file manually from my local development and push it to repo, but how is possible to fix it from admin side? Beside I recognized its not possible to edit slug of category from admin side neither.

Looks like because Categories didn't have a title field Netlify CMS didn't know what to use as the "identifier field". See netlify docs here: https://www.netlifycms.org/docs/configuration-options/#identifier_field .

Added "name" as the identifier field in commit #f5c002847cca32de89f6d7c4372ccfb823119f25.
This fixes the ability to post new categories in the admin interface.

As for changing the slug in the admin interface, that is not possible at this time and must be done via the file structure.

Thanks!