Environment
- Netlify CMS version: netlify-cms-app@2.12.17
- Git provider: git-gateway
- Browser version: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36
Explanation
As you can see below, the code works for the most part, but specifically in the CMS's Preview pane, when I add a group
element (list), it breaks for some reason. I've noticed that this issue happens in the custom preview template, in this line, but I wasn't able to see anything wrong in there. Is there a possible fix to it?
When adding a subgroup
element (nested list) - it works as expected
Code
I created this public repo with just the code needed, so anyone can easily reproduce. You can also see this site here.
config.yml
publish_mode: simple
slug:
encoding: unicode
clean_accents: false
sanitize_replacement: "-"
backend:
name: git-gateway
branch: master
media_folder: static/images
public_folder: /images
collections:
- name: pages
label: Pages
files:
- file: src/pages/index.md
label: Index
name: index
fields:
- label: Groups
name: groups
widget: list
fields:
- label: Title
name: title
widget: string
- label: Subgroups
name: subgroups
widget: list
fields:
- label: Subtitle
name: subtitle
widget: string
publish: true
sortableFields:
- commit_date
- commit_author
view_filters: []