Skip to content

TypeError: Cannot destructure property 'url' of 'e.element.data' as it is undefined. #7585

@woeterman94

Description

@woeterman94

Describe the bug

To Reproduce

Try pasting an image from clipboard into the contents field.

Expected behavior

Screenshots

Applicable Versions:

  • Decap CMS version: [email protected]
  • Git provider: test-repo
  • Browser version: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

CMS configuration

backend:
  name: test-repo
site_url: https://example.com
publish_mode: editorial_workflow
media_folder: assets/uploads
collections:
  - name: posts
    label: Posts
    label_singular: Post
    description: >
      The description is a great place for tone setting, high level information,
      and editing guidelines that are specific to a collection.
    folder: _posts
    slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
    summary: "{{title}} -- {{year}}/{{month}}/{{day}}"
    create: true
    editor:
      visualEditing: true
    view_filters:
      - label: Posts With Index
        field: title
        pattern: "This is post #"
        id: "title__This is post #"
      - label: Posts Without Index
        field: title
        pattern: front matter post
        id: title__front matter post
      - label: Drafts
        field: draft
        pattern: true
        id: draft__true
    view_groups:
      - label: Year
        field: date
        pattern: \d{4}
        id: date__\d{4}
      - label: Drafts
        field: draft
        id: draft__undefined
    fields:
      - label: Title
        name: title
        widget: string
        tagname: h1
      - label: Draft
        name: draft
        widget: boolean
        default: false
      - label: Publish Date
        name: date
        widget: datetime
        format: YYYY-MM-DD HH:mm
        default: "{{now}}"
      - label: Cover Image
        name: image
        widget: image
        required: false
        tagname: ""
      - label: Body
        name: body
        widget: markdown
        hint: Main content goes here.
    publish: true
    type: folder_based_collection
    sortable_fields:
      - title
      - date
  - name: restaurants
    label: Restaurants
    label_singular: Restaurant
    description: >
      Restaurants is an entry type used for testing galleries, relations and
      other widgets. The tests must be written in such way that adding new
      fields does not affect previous flows.
    folder: _restaurants
    slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
    summary: "{{title}} -- {{year}}/{{month}}/{{day}}"
    create: true
    editor:
      visualEditing: true
    fields:
      - label: Title
        name: title
        widget: string
        tagname: h1
      - label: Body
        name: body
        widget: markdown
        hint: Main content goes here.
      - name: gallery
        widget: image
        choose_url: true
        media_library:
          config:
            multiple: true
            max_files: 999
      - name: post
        widget: relation
        collection: posts
        multiple: true
        search_fields:
          - title
        display_fields:
          - title
        value_field: "{{slug}}"
        filters:
          - field: draft
            values:
              - false
      - name: authors
        label: Authors
        label_singular: Author
        widget: list
        fields:
          - label: Name
            name: name
            widget: string
            hint: First and Last
          - label: Description
            name: description
            widget: markdown
    publish: true
    type: folder_based_collection
    sortable_fields:
      - title
    view_filters: []
    view_groups: []
  - name: faq
    label: FAQ
    folder: _faqs
    create: true
    fields:
      - label: Question
        name: title
        widget: string
        tagname: h1
      - label: Answer
        name: body
        widget: markdown
    publish: true
    type: folder_based_collection
    sortable_fields:
      - title
    view_filters: []
    view_groups: []
  - name: settings
    label: Settings
 
...

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