Skip to content

Error: Cannot find a descendant at path [8,2,0,2] in node: {"children":[{"type":"heading-two","ch... #7930

Description

@xiagaogaozi

Describe the bug

To Reproduce

Expected behavior

Screenshots

Applicable Versions:

  • Decap CMS version: decap-cms@3.12.2
  • Git provider: github
  • Browser version: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0

CMS configuration

backend:
  name: github
  repo: PigmentTokyo/st-shujuku-content
  branch: main
  base_url: https://st-shujuku.com
  auth_endpoint: /api/decap/auth
  auth_scope: public_repo
  commit_messages:
    create: 新增 {{collection}}:{{slug}}
    update: 更新 {{collection}}:{{slug}}
    delete: 删除 {{collection}}:{{slug}}
    uploadMedia: 上传文件:{{path}}
    deleteMedia: 删除文件:{{path}}
site_url: https://st-shujuku.com
display_url: https://st-shujuku.com
logo_url: https://st-shujuku.com/favicon.ico
publish_mode: simple
media_folder: uploads
public_folder: /uploads
editor:
  preview: false
collections:
  - name: sections
    label: 教程章节
    label_singular: 教程章节
    description: 编辑后保存会提交到 Git;服务器验证并自动发布 VitePress。
    folder: sections
    extension: json
    format: json
    create: true
    delete: false
    identifier_field: id
    slug: "{{id}}"
    summary: "{{order}} · {{title}}"
    preview_path: sections/{{id}}.html
    sortable_fields:
      - field: order
        default_sort: null
      - field: title
        default_sort: null
      - field: archive
        default_sort: null
    view_filters:
      - label: 当前教程
        field: archive
        pattern: "false"
        id: archive__false
      - label: 旧版存档
        field: archive
        pattern: "true"
        id: archive__true
    fields:
      - label: 章节编号
        name: id
        widget: string
        pattern:
          - ^sec[0-9]{2,3}$
          - 格式必须是 sec 加 2–3 位数字,例如 sec15。
        hint: 已有章节不要修改编号;新章节请使用尚未占用的编号。
      - label: 排序
        name: order
        widget: number
        value_type: int
        min: 0
        step: 1
        hint: 数字越小越靠前,且不能与其他章节重复。
      - label: 标题
        name: title
        widget: string
      - label: 旧版存档
        name: archive
        widget: boolean
        default: false
      - label: 正文
        name: body
        widget: markdown
        hint: 普通换行会在前台保留;上传的新图片会放在 /uploads/。
    publish: true
    type: folder_based_collection
    view_groups: []
    editor:
      preview: false
  - name: html_pages
    label: HTML 页面
    label_singular: HTML 页面
    description: 上传完整的单文件 HTML;发布地址为 /html/页面标识.html,并在隔离沙箱中运行。
    folder: html-pages
    media_folder: /html-uploads
    public_folder: /html-uploads
    extension: json
    format: json
    create: true
    delete: true
    identifier_field: slug
    slug: "{{slug}}"
    summary: "{{title}} · /html/{{slug}}.html"
    preview_path: html/{{slug}}.html
    fields:
      - label: 页面标题
        name: title
        widget: string
      - label: 页面标识
        name: slug
        widget: string
        pattern:
          - ^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$
          - 请使用 1–64 位小写英文字母、数字或连字符,例如 my-page。
        hint: 保存后用于公开网址;创建后尽量不要修改。
      - label: HTML 文件
        name: html_file
        widget: file
        allow_multiple: false
        choose_url: false
        media_library:
          config:
            multiple: false
            max_file_size: 5242880
        hint: 仅支持 UTF-8、最大 5 MiB 的完整单文件 .html;文件名建议使用英文和数字。
      - label: 公开页面
        name: enabled
        widget: boolean
        default: true
        hint: 关闭后保留 Git 历史和后台条目,但不生成公开页面。
    publish: true
    type: folder_based_collection
    sortable_fields:
      - field: commit_date
      - field: slug
      - field: commit_author
    view_filters: []
    view_groups: []
    editor:
      preview: false
slug:
  encoding: unicode
  clean_accents: false
  sanitize_replacement: "-"
isFetching: false
error: null

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions