Folders feature breaks admin UI for empty collections in 3.55+
Closed this issue · 3 comments
danielkoller commented
Describe the Bug
Collections with folders: true crash the admin UI when empty. The error occurs in @payloadcms/next/src/views/Root/index.tsx:169 when trying to read res.value from undefined collection preferences.
Link to the code that reproduces this issue
https://github.com/danielkoller/payload-folders-bug
Reproduction Steps
- Create a collection with folders: true
- Ensure the collection has no documents
- Navigate to the collection in admin UI
- See error: TypeError: Cannot read properties of undefined (reading 'value')
Which area(s) are affected? (Select all that apply)
area: core
Environment Info
Binaries:
Node: 22.16.0
npm: 10.9.2
Yarn: 1.22.22
pnpm: 10.2.0
Relevant Packages:
payload: 3.55.1
next: 15.4.4
@payloadcms/db-postgres: 3.55.1
@payloadcms/email-nodemailer: 3.55.1
@payloadcms/graphql: 3.55.1
@payloadcms/live-preview: 3.55.1
@payloadcms/live-preview-react: 3.55.1
@payloadcms/next/utilities: 3.55.1
@payloadcms/payload-cloud: 3.55.1
@payloadcms/plugin-form-builder: 3.55.1
@payloadcms/plugin-nested-docs: 3.55.1
@payloadcms/plugin-redirects: 3.55.1
@payloadcms/plugin-search: 3.55.1
@payloadcms/plugin-seo: 3.55.1
@payloadcms/richtext-lexical: 3.55.1
@payloadcms/translations: 3.55.1
@payloadcms/ui/shared: 3.55.1
react: 19.1.0
react-dom: 19.1.0
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:40 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6041
Available memory (MB): 24576
Available CPU cores: 12
PatrikKozak commented
Hey @danielkoller - thanks for bringing this up!
We actually discovered this last week ourselves and have a merged fix for it here!
We'll get a release out with this fix this week most likely. I'm going to close this issue for now as it should be resolved after a new version release.
danielkoller commented
@PatrikKozak awesome, thanks!
github-actions commented
This issue has been automatically locked.
Please open a new issue if this issue persists with any additional detail.