decaporg / decap-cms

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

TypeError: e.map is not a function #6043

Open LisaP117 opened 2 years ago

LisaP117 commented 2 years ago

Bug Unable to get into entries on the CMS to update my pages due to error page being presented. "TypeError: e.map is not a function"

To reproduce I log in to Netlify CMS, navigate to pages, click on index and then am presented with the attached screenshot.

What I expect I would expect to log in, navigate to pages, select the index page and be presented with editable boxes.

Screenshot

Screenshot 2021-12-09 at 11 25 40

Applicable Versions:

CMS configuration


backend:
  name: git-gateway
  branch: master
site_url: https://secure24.co.uk
publish_mode: editorial_workflow
media_folder: _site/images/uploads
public_folder: src/images/uploads
collections:
  - name: pages
    label: Pages
    files:
      - name: index
        label: Index
        folder: src/site/_data/
        file: src/site/_data/index.json
        fields:
          - label: Title
            name: title
            widget: string
          - label: Subtitle
            name: subtitle
            widget: string
            required: false
          - label: Intro
            name: intro
            widget: markdown
          - label: Secondary content
            name: secondaryContent
            widget: list
            required: false
            fields:
              - label: Title
                name: title
                widget: string
              - name: content
                label: Content
                widget: list
                fields:
                  - label: Paragraph
                    name: paragraph
                    widget: markdown
                    required: false
                  - name: bullets
                    label: bullets
                    widget: list
                    required: false
                    fields:
                      - label: BulletPoint
                        name: bulletpoint
                        widget: string
                        required: false
          - name: pricing
            label: Pricing
            widget: list
            fields:
              - label: Package
                name: package
                widget: string
              - name: features
                label: Features
                widget: list
                fields:
                  - label: Feature
                    name: feature
                    widget: string
              - name: pricing
                label: Pricing
                widget: list
                fields:
                  - label: Price
                    name: price
                    widget: string
      - name: about
        label: About
        folder: src/site/_data/
        file: src/site/_data/about.json
        fields:
          - name: about
            label: about
            widget: list
            fields:
              - label: Title
                name: name
                widget: string
              - label: Subtitle
                name: subtitle
                widget: string
              - name: about
                label: About
                widget: list
                fields:
                  - label: Paragraph
                    name: paragraph
                    widget: markdown
                  - label: Image
                    name: image
                    widget: image
                    required: false
      - name: caseStudies
        label: Case Studies
        folder: src/site/_data/
        file: src/site/_data/caseStudies.json
        fields:
          - name: studies
            label: Studies
            widget: list
            fields:
              - label: Name
                name: name
                widget: string
              - label: Subtitle
                name: subtitle
                widget: string
              - name: about
                label: About
                widget: list
                fields:
                  - label: Paragraph
                    name: paragraph
                    widget: markdown
                  - label: Author
                    name: Author
                    widget: string
                    required: false
              - label
...
erezrokah commented 2 years ago

Hi @LisaP117, thank you for opening the issue. Do you mind sharing the full configuration? That will make it easier for others to reproduce the issue

LisaP117 commented 2 years ago

Please let me know if this is correct. Thanks

Repository - https://github.com/LisaP117/secure24

Full config.yml file

backend:
  name: git-gateway
  branch: master # Branch to update (optional; defaults to master)

site_url: https://secure24.co.uk

publish_mode: editorial_workflow
media_folder: "_site/images/uploads" # Media files will be stored in the repo under images/uploads
public_folder: "src/images/uploads"

collections:
  - name: "pages"
    label: "Pages"
    files:
      - name: "index"
        label: "Index"
        folder: "src/site/_data/"
        file: "src/site/_data/index.json"
        fields:
          - {label: Title, name: title, widget: string}
          - {label: Subtitle, name: subtitle, widget: string, required: false}
          - {label: Intro, name: intro, widget: markdown}
          - label: Secondary content
            name: secondaryContent
            widget: list
            required: false
            fields:
              - {label: Title, name: title, widget: string}
              - name: content
                label: Content
                widget: list
                fields:
                  - {label: Paragraph, name: paragraph, widget: markdown, required: false}
                  - name: bullets
                    label: bullets
                    widget: list
                    required: false
                    fields:
                      - {label: BulletPoint, name: bulletpoint, widget: string, required: false}
          - name: pricing
            label: Pricing
            widget: list
            fields:
              - {label: Package, name: package, widget: string}
              - name: features
                label: Features
                widget: list
                fields:
                  - {label: Feature, name: feature, widget: string}
              - name: pricing
                label: Pricing
                widget: list
                fields:
                  - {label: Price, name: price, widget: string}
      - name: "about"
        label: "About"
        folder: "src/site/_data/"
        file: "src/site/_data/about.json"
        fields:
          - name: about
            label: about
            widget: list
            fields:
              - {label: Title, name: name, widget: string}
              - {label: Subtitle, name: subtitle, widget: string}
              - name: about
                label: About
                widget: list
                fields:
                  - {label: Paragraph, name: paragraph, widget: markdown}
                  - {label: 'Image', name: 'image', widget: 'image', required: false}
      - name: "caseStudies"
        label: "Case Studies"
        folder: "src/site/_data/"
        file: "src/site/_data/caseStudies.json"
        fields:
          - name: studies
            label: Studies
            widget: list
            fields:
              - {label: Name, name: name, widget: string}
              - {label: Subtitle, name: subtitle, widget: string}
              - name: about
                label: About
                widget: list
                fields:
                  - {label: Paragraph, name: paragraph, widget: markdown}
                  - {label: Author, name: Author, widget: string, required: false}
              - {label: 'Image', name: 'image', widget: 'image', required: false}
              - {label: YouTube video embed URL, name: 'videoUrl', widget: string, required: false}
      - name: "privacyPolicy"
        label: "Privacy Policy"
        folder: "src/site/_data/"
        file: "src/site/_data/privacyPolicy.json"
        fields:
          - {label: Title, name: title, widget: string}
          - {label: Subtitle, name: subtitle, widget: string}
          - {label: Intro, name: intro, widget: markdown}
          - name: sections
            label: Section
            widget: list
            fields:
              - {label: Title, name: title, widget: string}
              - {label: Policy Description, name: policy, widget: markdown}
      - name: "faqs"
        label: "FAQs"
        folder: "src/site/_data/"
        file: "src/site/_data/faqs.json"
        fields:
          - {label: Title, name: title, widget: string}
          - {label: Subtitle, name: subtitle, widget: string}
          - {label: Intro, name: intro, widget: markdown}
          - name: sections
            label: Section
            widget: list
            fields:
              - {label: Title, name: title, widget: string}
              - {label: Answer, name: answer, widget: markdown, required: false}
              - label: List
                name: list
                widget: list
                required: false
                fields:
                - {label: Content, name: content, widget: markdown}
manassikri commented 2 years ago

Can I work on this issue? I am new to the project and would like to learn through this issue.

LisaP117 commented 2 years ago

Yes you can, I’d appreciate the help!

manassikri commented 2 years ago

I used the gatsby template for the backend and was not able to reproduce this error. It was working perfectly fine and I was able to access the index page. image

aravindont commented 1 year ago

image

I am getting the above error when i deploy to netlify please help

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

AryanSwaroop commented 3 days ago

can i work on this ? is it resolved yet ?

martinjagodic commented 18 hours ago

@AryanSwaroop sure, I assigned you the issue.