decaporg / decap-cms

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

Error: Cannot resolve a DOM node from Slate node: {"text":""} #7220

Open peterstory opened 1 month ago

peterstory commented 1 month ago

Describe the bug I was creating a post in the markdown editor. I typed shift-return to create a line break instead of a paragraph.

To Reproduce Type shift-return to create a line break instead of a paragraph. Then delete the line break, and create a paragraph break instead. Decap will crash.

Expected behavior

Screenshots

Applicable Versions:

CMS configuration

backend:
  name: gitlab
  repo: trinityworc/trinityworc.gitlab.io
  branch: main
  auth_type: pkce
  app_id: 4cc4af5fcdddf53c7d6f6ff0d170153a999635dda84e2dbec80658b69a4e3618
media_folder: images/uploads
public_folder: /images/uploads
collections:
  - name: news
    label: News
    folder: _posts
    create: true
    slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
    fields:
      - label: Layout
        name: layout
        widget: hidden
        default: post
      - label: Title
        name: title
        widget: string
      - label: Body
        name: body
        widget: markdown
      - label: Date
        name: date
        widget: datetime
    publish: true
    type: folder_based_collection
    sortable_fields:
      - commit_date
      - title
      - date
      - commit_author
    view_filters: []
    view_groups: []
  - name: about
    label: About
    folder: _about
    fields:
      - label: Title
        name: title
        widget: string
      - label: Anchor
        name: anchor
        widget: hidden
      - label: Image
        name: image
        widget: image
      - label: Image Alt Text
        name: image_alt
        widget: string
      - label: Body
        name: body
        widget: markdown
    publish: true
    type: folder_based_collection
    sortable_fields:
      - commit_date
      - title
      - commit_author
    view_filters: []
    view_groups: []
  - name: staff
    label: Staff
    folder: _staff
    fields:
      - label: Name
        name: name
        widget: string
      - label: Title
        name: title
        widget: string
      - label: Email
        name: email
        widget: string
      - label: Phone
        name: phone
        widget: string
      - label: Image
        name: image
        widget: image
      - label: Website
        name: website
        widget: string
    publish: true
    type: folder_based_collection
    sortable_fields:
      - commit_date
      - name
      - name
    view_filters: []
    view_groups: []
publish_mode: simple
slug:
  encoding: unicode
  clean_accents: false
  sanitize_replacement: "-"
isFetching: false
error: null

Additional context

mohab-sameh commented 1 month ago

Similar to what happened with me in #7218. Consistently reproducible and a complete blocker issue.

LHSnow commented 3 weeks ago

Also similar to #7123