decaporg / decap-cms

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

TypeError: Cannot read properties of undefined (reading 'filter') #6470

Closed guypursey closed 2 years ago

guypursey commented 2 years ago

Describe the bug The page won't open

To Reproduce

Search for "smart" in the "Guides" collection and try to open the page "energy-guides/smart-meters-what-is-a-smart-meter-and-how-does-it-work".

Expected behavior The page should open the editor and preview panes for the given page.

Screenshots

The screen looks like it's loading...

Then shows this error message

Applicable Versions:

CMS configuration


backend:
  name: git-gateway
  branch: production
  commit_messages:
    create: Create {{collection}} “{{slug}}”
    update: Update {{collection}} “{{slug}}”
    delete: Delete {{collection}} “{{slug}}”
    uploadMedia: "[skip ci] Upload “{{path}}”"
    deleteMedia: "[skip ci] Delete “{{path}}”"
publish_mode: editorial_workflow
local_backend: false
media_folder: static/img
public_folder: /img
collections:
  - name: terms
    label: Terms
    folder: src/pages/terms
    create: true
    identifier_field: adminPanelPageName
    summary: "{{fields.adminPanelPageName}}"
    nested:
      depth: 3
    fields:
      - name: path
        meta: true
        required: true
        widget: string
        label: Path
        index_file: index
        pattern:
          &a1
          - (^(?!/|blog/|guides/|smart-home/|electric-cars/|campaigns/|planet-ovo/).*$)|Must
            not start with '/', blog, guides, smart-home, electric-cars,
            campaigns, planet-ovo
      - label: Post scheduler
        name: postShceduler
        widget: post-scheduler
        required: false
      - label: Entity Control
        name: entityControl
        widget: entity-control
        required: false
        default: ""
        teamsToReview:
          - team:seo
      - label: Admin panel page name
        name: adminPanelPageName
        widget: string
        default: ""
        required: false
      - label: page-history
        name: page-history
        widget: page-history
        required: false
      - label: Page meta data
        name: pageMetaData
        widget: object
        collapsed: true
        fields:
          - label: meta title
            name: title
            widget: string
            hint: "*required. max length is 70 characters"
            default: OVO Energy
          - label: meta description
            name: description
            widget: string
            hint: "*required. max length is 155 characters"
          - label: og:title
            name: ogTitle
            widget: string
            hint: "*required"
          - label: og:description
            name: ogDescription
            widget: string
            hint: "*required"
          - label: og:image
            name: ogImage
            widget: bynder-image
            default: 6d02d8d9-9c61-46da-badf-24968a593bcb
            hint: "*required"
          - label: Exclude from sitemap.xml
            name: isExcludedFromSitemap
            widget: boolean
            default: false
            required: false
      - label: terms
        name: templateKey
        widget: hidden
        default: terms-page
      - label: Title
        name: title
        widget: string
      - label: Body
        name: body
        widget: markdown
        buttons:
          - bold
          - italic
          - code
          - link
          - heading-two
          - heading-three
          - heading-four
          - heading-five
          - quote
          - bulleted-list
          - numbered-list
        editor_components:
          - image-with-alt
          - editor-table
          - anchor
          - text-with-align
        hint: "*If the new line is needed inside the table cell, please use </br> tag."
      - label: Technical don't use it (Menu)
        name: menu
        widget: relation
        collection: menus
        search_fields:
          - name
        value_field: name
        display_fields:
          - name
        multiple: true
        default:
          - Footer menu
          - Header menu
          - Social menu
          - Terms menu
    meta:
      path:
        widget: string
        label: 
...
guypursey commented 2 years ago

Sorry, thought I was opening a local issue as I suspect this is to do with our config rather than something generic to Netlify. Closing now.