decaporg / decap-cms

A Git-based CMS for Static Site Generators
https://decapcms.org
MIT License
17.8k stars 3.03k forks source link

Malformed Frontmatter causes website to not load (TypeError: t.map is not a function) #6586

Closed macbrayne closed 1 year ago

macbrayne commented 1 year ago

Describe the bug When logging into the admin page an error appears. To Reproduce Happened after adding a nested list Expected behavior

Screenshots

Applicable Versions:

CMS configuration I've also uploaded the config as a gist: https://gist.github.com/macbrayne/bb9ef5f616872368ecd6f96b496fd2fd

backend:
  name: git-gateway
  branch: main
media_folder: static/images
public_folder: images
collections:
  - name: recipes
    label: Recipe
    folder: src/lib/posts
    create: true
    slug: "{{slug}}"
    fields:
      - label: Title
        name: title
        widget: string
      - label: Publish Date
        name: date
        widget: datetime
      - label: Featured Image
        name: image
        widget: image
      - label: Tags
        name: tags
        widget: list
      - label: Ingredients
        name: ingredients
        widget: list
        collapsed: false
        summary: "{{fields.section}}"
        fields:
          - label: Section
            name: section
            widget: string
          - label: Ingredients
            name: sublist
            widget: list
            collapsed: true
            summary: "{{fields.ingredient}}"
            field:
              label: Ingredient
              name: ingredient
              widget: string
      - label: Body
        name: body
        widget: markdown
    publish: true
    type: folder_based_collection
    sortable_fields:
      - commit_date
      - title
      - date
      - commit_author
    view_filters: []
    view_groups: []
publish_mode: simple
slug:
  encoding: unicode
  clean_accents: false
  sanitize_replacement: "-"
isFetching: false
error: null

Additional context The framework used for the website is SvelteKit however that shouldn't really affect Netlify.

TypeError: t.map is not a function at https://unpkg.com/netlify-cms@%5E2.0.0/dist/netlify-cms.js:668:2698 at Ko (https://unpkg.com/netlify-cms@%5E2.0.0/dist/netlify-cms.js:188:57930) at gs (https://unpkg.com/netlify-cms@%5E2.0.0/dist/netlify-cms.js:188:104169) at ul (https://unpkg.com/netlify-cms@%5E2.0.0/dist/netlify-cms.js:188:96717) at sl (https://unpkg.com/netlify-cms@%5E2.0.0/dist/netlify-cms.js:188:96642) at Js (https://unpkg.com/netlify-cms@%5E2.0.0/dist/netlify-cms.js:188:93672) at https://unpkg.com/netlify-cms@%5E2.0.0/dist/netlify-cms.js:188:45314 at t.unstable_runWithPriority (https://unpkg.com/netlify-cms@%5E2.0.0/dist/netlify-cms.js:196:3844) at qi (https://unpkg.com/netlify-cms@%5E2.0.0/dist/netlify-cms.js:188:45023) at Vi (https://unpkg.com/netlify-cms@%5E2.0.0/dist/netlify-cms.js:188:45259)
martinjagodic commented 1 year ago

Hi @macbrayne, we believe that you have a problem, but in order for anybody to help you, you need to provide as much detail as possible. The issue template contains the bare minimum of what is required (how to reproduce, expected behaviour, screenshots, etc..).

I'm closing this issue for now. If the problem persists, please open a new issue with all of the details filled out. Also, before posting a new issue, please verify that everything is all right with your environment (computer, internet, browser) and verify whether this issue was already reported by someone else. For general help, please turn to our Slack.