Skip to content

"By Folder" in collection view crashes. Not only user experiencing #12875

Open
@cgilly2fast

Description

@cgilly2fast

Describe the Bug

TypeError: Cannot read properties of undefined (reading 'has') in FolderFileCard when accessing folder view

Describe the Bug

When navigating to the folder view for a collection with folders: true enabled, the page crashes with a TypeError. The error occurs in FolderFileCard/index.tsx at line 154 where itemKeysToMove.has(item.itemKey) is called, but itemKeysToMove is undefined.

In this thread two other say they have same issue: #12729 (reply in thread)

Image
Image

Link to the code that reproduces this issue

https://github.com/cgilly2fast/payload-issue-folders

Reproduction Steps

  1. Set up a collection with folders: true in the collection config
  2. Navigate to /admin/collections/[collection-name]/payload-folders
  3. Page crashes with TypeError: Cannot read properties of undefined (reading 'has')

Which area(s) are affected? (Select all that apply)

area: core

Environment Info

3.43.0

Metadata

Metadata

Assignees

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