Skip to content

TypeError: Cannot read properties of undefined (reading 'path') #7450

@CourtneyFradreck

Description

@CourtneyFradreck

Describe the bug

I'm unable to add an image using the Decap CMS admin interface. When I attempt to select an image for the Featured Image field in one of my blog entries, the CMS crashes and displays a generic error message.


To Reproduce

Steps to reproduce the behavior:

  1. Open the Decap CMS admin panel.
  2. Go to the Blog collection.
  3. Try to create or edit an entry.
  4. Click the image widget for the Featured Image field.
  5. Select an image to upload or choose from the media library.
  6. Error is thrown.

Expected behavior

I expected the image to be selected and displayed in the editor without any errors.


Screenshots

N/A — the admin interface just crashes with the following error.

Error
There's been an error - please open an issue on GitHub.

Opening an issue pre-populates it with the error message and debugging data.
Please verify the information is correct and remove sensitive data if exists.

Details
TypeError: Cannot read properties of undefined (reading 'path') at Hx (https://unpkg.com/decap-cms@%5E3.0.0/dist/decap-cms.js:33:6887) at Ea (https://unpkg.com/decap-cms@%5E3.0.0/dist/decap-cms.js:2:1957796) at As (https://unpkg.com/decap-cms@%5E3.0.0/dist/decap-cms.js:2:1969417) at El (https://unpkg.com/decap-cms@%5E3.0.0/dist/decap-cms.js:2:2015495) at wu (https://unpkg.com/decap-cms@%5E3.0.0/dist/decap-cms.js:2:2003780) at yu (https://unpkg.com/decap-cms@%5E3.0.0/dist/decap-cms.js:2:2003708) at vu (https://unpkg.com/decap-cms@%5E3.0.0/dist/decap-cms.js:2:2003571) at au (https://unpkg.com/decap-cms@%5E3.0.0/dist/decap-cms.js:2:2000378) at uu (https://unpkg.com/decap-cms@%5E3.0.0/dist/decap-cms.js:2:2000767) at qi (https://unpkg.com/decap-cms@%5E3.0.0/dist/decap-cms.js:2:1941642)


Applicable Versions:

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

CMS configuration

backend:
  name: git-gateway
  branch: main
media_folder: public/assets/blog-images
public_folder: /assets/blog-images
collections:
  - name: blog
    label: Blog
    folder: src/blogs
    create: true
    slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
    fields:
      - label: Title
        name: title
        widget: string
      - label: Description
        name: description
        widget: string
      - label: Author
        name: author
        widget: string
      - label: Publish Date
        name: date
        widget: datetime
      - label: Tags
        name: tags
        widget: list
        default:
          - post
      - label: Featured Image
        name: image
        widget: image
      - label: Image Caption
        name: imageAlt
        widget: string
      - label: Body
        name: body
        widget: markdown
    publish: true
    type: folder_based_collection
    sortable_fields:
      - commit_date
      - title
      - date
      - author
      - description
    view_filters: []
    view_groups: []
publish_mode: simple
slug:
  encoding: unicode
  clean_accents: false
  sanitize_replacement: "-"
isFetching: false
error: null

![Image](https://github.com/user-attachments/assets/86c858b7-4bc7-48b8-97b7-3d3587af2220)

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