Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Mishmcq opened this issue Nov 30, 2023 · 2 comments
Open

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

Mishmcq opened this issue Nov 30, 2023 · 2 comments

Comments

@Mishmcq
Copy link

Mishmcq commented Nov 30, 2023

Describe the bug

To Reproduce

Expected behavior

Screenshots

Applicable Versions:

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

CMS configuration

backend:
  name: github
  repo: Fuelweb/dishfun
  branch: main
  base_url: https://protected-plains-93496.herokuapp.com
  squash_merges: true
  site_url: https://www.dishfun.com
publish_mode: editorial_workflow
media_folder: assets/images
logo_url: https://www.fuelwebmarketing.com/assets/images/fuelweb-nobg.png
collections:
  - name: pages
    label: Pages
    folder: _pages
    create: true
    editor:
      preview: false
    summary: "{{titletag}}"
    fields:
      - label: Title (used for default url and netlify display)
        name: title
        widget: string
        required: true
      - label: Layout
        name: layout
        widget: string
        default: page-full
      - label: "Permalink (optional: link is named automatically from the title field)"
        name: permalink
        widget: string
        required: false
      - label: SEO Title Tag
        name: titletag
        widget: string
      - label: Description
        name: description
        widget: string
      - label: Body
        name: body
        widget: markdown
      - label: Sitemap
        name: sitemap
        widget: boolean
        default: true
        required: true
      - label: JSON Schema Markup
        name: schema
        widget: text
        required: false
    publish: true
    type: folder_based_collection
    sortable_fields:
      - commit_date
      - title
      - commit_author
      - description
    view_filters: []
    view_groups: []
  - name: blog
    label: Blog
    folder: _blogposts
    create: true
    preview_path: blog/{{slug}}
    editor:
      preview: false
    view_groups:
      - label: Year
        field: date
        pattern: \d{4}
        id: date__\d{4}
    summary: "{{date}} - {{h1Headline}}"
    fields:
      - label: Title (used for url and netlify display)
        name: title
        widget: string
        required: true
      - label: Layout
        name: layout
        widget: hidden
        default: post
      - label: Publish Date
        name: date
        widget: datetime
        format: YYYY-MM-DD
        time_format: false
      - label: SEO Title Tag
        name: titletag
        widget: string
      - label: Description
        name: description
        widget: text
      - label: Author
        name: author
        widget: select
        options:
          - Michelle McHugh
          - Alfred Rasch
      - label: Featured Image
        name: featuredImage
        widget: image
      - label: Featured Image Alt Tag
        name: featuredImageAlt
        widget: string
      - label: "Permalink (optional: link is named automatically from the title field)"
        name: permalink
        widget: string
        required: false
      - label: "H1: H1 needs to go here for SEO"
        name: h1Headline
        widget: string
      - label: Body
        name: body
        widget: markdown
      - label: Sitemap
        name: sitemap
        widget: boolean
        default: true
        required: true
      - label: JSON Schema Markup
        name: schema
        widget: text
        required: false
    publish: true
    type: folder_based_collection
    sortable_fields:
      - commit_date
      - title
      - date
      - commit_author
      - description
    view_filters: []
  - name: salesbanner
    label: Sales Banner
    files:
      - label: Top Nav
        name: sales-banner
        file: _data/sales-banner.yml
        fields:
          - label: Text
            name: text
            widget: string
          - label: Start Date
            name: startDate
            widget: datetime
          - label: End Date
            name: endDate
            wid
...
@martinjagodic
Copy link
Member

Hi @Mishmcq, 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.

@martinjagodic martinjagodic closed this as not planned Won't fix, can't repro, duplicate, stale Dec 1, 2023
@vnourdin
Copy link
Contributor

vnourdin commented Dec 8, 2023

Hi, I have the same problem in 3.0.12, when editing a markdown field (but not all), the browser crash on this error.
I can't find what differs between this field and others.

Here are the console logs

Error: Cannot resolve a DOM node from Slate node: {"text":""}
    toDOMNode https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js:485
    toDOMPoint https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js:485
    toDOMRange https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js:485
    r https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js:485
    ln https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js:485
    us https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js:485
    cs https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js:485
    Ol https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js:485
    unstable_runWithPriority https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js:485
    Vi https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js:485
    Tl https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js:485
    hl https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js:485
    Yi https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js:485
    unstable_runWithPriority https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js:485
    Vi https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js:485
    Yi https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js:485
    Zi https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js:485
    ml https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js:485
    onChange https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js:485
    apply https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js:485
decap-cms.js:485:2244126

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants