decap-cms icon indicating copy to clipboard operation
decap-cms copied to clipboard

TypeError: Cannot read properties of undefined (reading 'length')

Open antoniohof opened this issue 3 years ago • 0 comments

Describe the bug

Can't edit an item in the collection

To Reproduce

Open the item in the CMS

Expected behavior

Should open the edit page

Screenshots

Applicable Versions:

  • Netlify CMS version: [email protected]
  • Git provider: git-gateway
  • Browser version: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36

CMS configuration

backend:
  name: git-gateway
  branch: main
media_folder: static/img
public_folder: /img
collections:
  - label: Pages
    label_singular: Page
    name: pages
    create: false
    files:
      - label: About Page
        name: about
        file: content/about.md
        format: frontmatter
        fields:
          - label: Body EN
            name: body_en
            widget: markdown
          - label: Body RU
            name: body_ru
            widget: markdown
    publish: true
    type: file_based_collection
    sortable_fields:
      - commit_date
      - commit_author
    view_filters: []
    view_groups: []
  - label: Steps
    label_singular: Step
    name: steps
    folder: content/steps
    format: frontmatter
    create: true
    slug: "{{identifier}}"
    identifier_field: identifier
    fields:
      - label: UUID
        name: uuid
        widget: uuid
      - label: Name
        name: name
        widget: string
      - label: Title EN
        name: title_en
        widget: string
        required: false
      - label: Title RU
        name: title_ru
        widget: string
        required: false
      - label: Date
        name: date
        widget: date
        required: false
      - label: Narrative
        name: narrative
        widget: number
        default: 0
        value_type: int
        required: true
      - label: Order
        name: order
        widget: number
        value_type: int
        default: 1
        step: 1
        min: 1
      - label: Vue Component
        name: component
        widget: string
      - label: Body EN
        name: body_en
        widget: markdown
        required: false
      - label: Body RU
        name: body_ru
        widget: markdown
        required: false
      - label: Identifier
        name: identifier
        widget: hidden
        default: ""
    editor:
      preview: false
    sortable_fields:
      - order
    publish: true
    type: folder_based_collection
    view_filters: []
    view_groups: []
  - label: Backgrounds
    label_singular: Background
    name: backgrounds
    folder: content/backgrounds
    format: frontmatter
    create: true
    slug: "{{identifier}}"
    identifier_field: identifier
    fields:
      - label: UUID
        name: uuid
        widget: uuid
      - label: Name
        name: name
        widget: string
      - label: Step Start
        name: stepstart
        widget: number
        value_type: int
        default: 0
        step: 1
        min: 0
      - label: Step End
        name: stepend
        widget: number
        value_type: int
        default: 0
        step: 1
        min: 0
      - label: Vue Component
        name: component
        widget: string
      - label: Data JSON
        name: data
        widget: file
        required: false
        media_folder: /files
        media_library:
          media_folder: /files
          config:
            multiple: false
        public_folder: /files
      - label: Chart Options
        name: chartoptions
        widget: code
        required: false
        default_language: json
        output_code_only: true
      - label: Body EN
        name: body_en
        widget: markdown
        required: false
      - label: Body RU
        name: body_ru
        widget: markdown
        required: false
      - label: Identifier
        name: identifier
        widget: hidden
        default: ""
    editor:
      preview: false
    publish: true
    type: folder_based_collection
    sortable_fields:
      - commit_date
      - identifier
      - name
    view_filters: []
    view_groups: []
publish_mode: simple
slug:
  e
...

antoniohof avatar Sep 19 '22 14:09 antoniohof