To Reproduce
Steps to reproduce the behavior:
Screenshots
Applicable Versions:
CMS configuration
backend:
name: gitlab
repo: xxxx/xxxxx # Path to your GitLab repository
display_url: https://www.xxxx.com
media_folder: "images/uploads"
public_folder: "/images/uploads"
collections:
- name: "posts" # Used in routes, e.g., /admin/collections/blog
label: "Post" # Used in the UI
folder: "source/_posts" # The path to the folder where the documents are stored
create: true # Allow users to create new documents in this collection
slug: "{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
fields: # The fields for each document, usually in front matter
- {label: "Layout", name: "layout", widget: "hidden", default: "blog"}
- {label: "Title", name: "title", widget: "string"}
- {label: "Categories", name: "categories", widget: "list"}
- {label: "Tags", name: "tags", widget: "list"}
- {label: "Publish Date", name: "date", widget: "datetime"}
- {label: "Body", name: "body", widget: "markdown"}
Your list widgets (tags and categories) do not have field or fields defined.
- label: "Tags"
name: "tags"
widget: "list"
field: {label: "Tag", name: "tag_name", widget: "string"}
@arifpedia thanks for the detailed issue. I am going to close and we can open if the solution @tomrutger suggested did not fix it.
I'm having the same problem here. Has anyone found a solution yet?
@nicolasesnis did you check what @tomrutgers suggests as the issue here https://github.com/netlify/netlify-cms/issues/1807#issuecomment-429251896?
@tomrutgers @talves with a list widget like this:
- {label: "Categories", name: "categories", widget: "list"}
The CMS would just display a string like widget and value is split by , and stored as array.
@nicolasesnis can we see your config, if it's different from the one above.
I鈥檓 also running into this issue with a list widget in my custom widget:
fields: [{label: "Images", name: "id", widget: "list", field: {label: "Image", name: "galleryImage", widget: "image"}}],
Does anyone know a fix for this?
@steakscience I was having this exact same issue. I was trying to make a list of markdowns as a sub-field in a collection. I saw another discussion that mentioned if the existing data is mis-formatted, it can cause problems. I don't know if that's why it was broken or if it because I was trying to use 'body' for it.
I have the following Netlify Admin config:
collections:
- name: "event" # Used in routes, e.g., /admin/collections/blog
label: "Event" # Used in the UI
folder: "_events" # The path to the folder where the documents are stored
create: true # Allow users to create new documents in this collection
fields: # The fields for each document, usually in front matter
- {label: "Title", name: "title", widget: "string"}
- {label: "Date", name: "date", widget: "datetime"}
- {label: "Tags", name: "tags", widget: "list", fields: [{label: "Tag", name: "tag_name", widget: "string"}] }
and my question is with tags/widget list. I want an anonymous widget list. Currently it creates a front matter like
title: "Meeting #1 馃帀"
date: 2019-06-20 18:45:00 +0200
tags:
- tag_name: general-meeting
---
turns out to get below this is the yaml needed
collections:
- name: "event" # Used in routes, e.g., /admin/collections/blog
label: "Event" # Used in the UI
folder: "_events" # The path to the folder where the documents are stored
create: true # Allow users to create new documents in this collection
fields: # The fields for each document, usually in front matter
- {label: "Title", name: "title", widget: "string"}
- {label: "Date", name: "date", widget: "datetime"}
- {label: "Tags", name: "tags", widget: "list" }
title: "Meeting #1 馃帀"
date: 2019-06-20 18:45:00 +0200
tags:
- general-meeting
---
Most helpful comment
Your list widgets (tags and categories) do not have
fieldorfieldsdefined.