decap-cms icon indicating copy to clipboard operation
decap-cms copied to clipboard

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

Open peterstory opened this issue 1 year ago • 2 comments
trafficstars

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:

  • Decap CMS version: [email protected]
  • Git provider: gitlab
  • Browser version: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15

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

peterstory avatar May 30 '24 13:05 peterstory

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

mohab-sameh avatar May 31 '24 14:05 mohab-sameh

Also similar to #7123

LHSnow avatar Jun 03 '24 14:06 LHSnow

Closing as duplicate of #7152

martinjagodic avatar Aug 05 '24 08:08 martinjagodic

@peterstory do you mind checking if the crash still happens in 3.2.1?

demshy avatar Aug 07 '24 13:08 demshy

@demshy With 3.2.1, I don't have any issues. Thank you for the fix!

peterstory avatar Aug 07 '24 13:08 peterstory