decaporg / decap-cms

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

TypeError: t is null #7041

Closed learner-susu closed 5 months ago

learner-susu commented 5 months ago

Describe the bug

To Reproduce

Expected behavior

Screenshots

Applicable Versions:

CMS configuration


backend:
  name: git-gateway
  branch: main
  commit_messages:
    create: Create {{collection}} “{{slug}}”
    update: Update {{collection}} “{{slug}}”
    delete: Delete {{collection}} “{{slug}}”
    uploadMedia: "[skip ci] Upload “{{path}}”"
    deleteMedia: "[skip ci] Delete “{{path}}”"
media_folder: static/assets
public_folder: /assets
collections:
  - name: posts
    label: Posts
    label_singular: Post
    description: |
      Create awesome content here.
    folder: src/content/posts
    slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
    summary: "{{title}} — {{year}}/{{month}}/{{day}}"
    create: true
    fields:
      - label: Template
        name: template
        widget: hidden
        default: blog-post
      - label: Title
        name: title
        widget: string
        tagname: h1
      - label: Slug
        name: slug
        widget: string
        hint: Start slug with /. Use only alphanumeric characters, - and _. Avoid spaces
          in any cases.
      - label: Publish Date
        name: date
        widget: datetime
        dateFormat: YYYY-MM-DD
        timeFormat: HH:mm
        format: YYYY-MM-DD HH:mm
        date_format: YYYY-MM-DD
        time_format: HH:mm
      - label: SEO Description
        name: description
        widget: text
      - label: Featured Image
        name: featuredImage
        widget: image
        required: false
        tagname: ""
      - label: Body
        name: body
        widget: markdown
        hint: Main content goes here.
    publish: true
    type: folder_based_collection
    sortable_fields:
      - commit_date
      - title
      - date
      - commit_author
      - description
    view_filters: []
    view_groups: []
  - label: Pages
    name: pages
    files:
      - label: Home
        name: home
        file: src/content/pages/index.md
        fields:
          - label: Template
            name: template
            widget: hidden
            default: index-page
          - label: Slug
            name: slug
            widget: hidden
            default: /
          - label: Title
            name: title
            widget: string
          - label: Tagline
            name: tagline
            widget: string
          - label: Featured Image
            name: featuredImage
            widget: image
          - label: Body
            name: body
            widget: markdown
          - label: CTA
            name: cta
            widget: object
            fields:
              - name: ctaText
                label: CTA text
                widget: string
              - name: ctaLink
                label: CTA Link
                widget: string
      - label: About
        name: about
        file: src/content/pages/about.md
        fields:
          - label: Template
            name: template
            widget: hidden
            default: about-page
          - label: Slug
            name: slug
            widget: hidden
            default: /about
          - label: Title
            name: title
            widget: string
          - label: Body
            name: body
            widget: markdown
      - label: Contact
        name: contact
        file: src/content/pages/contact.md
        fields:
          - label: Template
            name: template
            widget: hidden
            default: contact-page
          - label: Slug
            name: slug
            widget: hidden
            default: /contact
          - label: Title
            name: title
            widget: string
          - label: Body
            name: body
            widget: markdown
    publish: true
    type: file_based_collection
    sortable_fields:

...
martinjagodic commented 5 months ago

Hi @learner-susu, please fill out all the fields in the issue template. The information you provided is not enough to debug the problem.

I'm closing the issue for now. Once you add the missing information, I can open it again.