[v4] Hierarchy view ignores the collection's `disableBulkDelete` / `disableBulkEdit`: bulk Edit and Delete are offered and fail with "An unknown error has occurred"
Maintainers usually reply within 1 day
Assessment
This issue has not been assessed yet.
Description
Describe the Bug
A collection with hierarchy can set disableBulkDelete: true and disableBulkEdit: true, which "disable the bulk delete/edit operation for the collection in the admin panel and the API". The list view honours them. The hierarchy view (By Collection) doesn't: selecting two documents there still offers Edit and Delete.
The API does refuse these operations (403 Collection categories has disabled bulk delete). So in the hierarchy view, confirming Delete only shows a toast, "An unknown error has occurred."
List view, 2 selected:
Hierarchy view, 2 selected:
After Delete → Confirm:
Cause.
renderListViewpasses the collection's flags to whichever view it renders,HierarchyListViewincluded:disableBulkDelete: collectionConfig.disableBulkDelete ?? disableBulkDelete(views/List/index.tsx#L603-L604,#L625).HierarchyListViewnever reads them (views/HierarchyList/index.tsx#L37-L51), and it rendersHierarchyListHeaderwithout them (#L339).HierarchyListHeaderaccepts both props (HierarchyListHeader/index.tsx#L24-L25), andDocumentListSelectionchecks them (!disableBulkEdit,!disableBulkDelete). But they always arrive asundefined.
The same applies when HierarchyListView is rendered with the props directly (both are part of ListViewClientProps). For example, a component that hosts the hierarchy view in a drawer for picking can't turn the destructive bulk actions off the way a list drawer does.
Expected: the hierarchy view hides bulk Edit/Delete when the collection (or the caller) disables them, like the list view does.
Link to the code that reproduces this issue
https://github.com/VeiaG/payload-4-reproductions/tree/repro-hierarchy-view-ignores-disable-bulk
Reproduction Steps
pnpm install, then runpnpm devinapps/next, and open/admin/collections/categories.- Tick two rows. The selection bar shows only "2 selected · Select all".
- Switch to By Category (
?view=hierarchy) and tick two rows. The selection bar shows Edit · Delete · Move. - Click Delete, then Confirm. A toast says "An unknown error has occurred." and nothing is deleted.
apps/next/payload.config.ts adds:
{
slug: 'categories',
admin: { useAsTitle: 'title' },
disableBulkDelete: true,
disableBulkEdit: true,
fields: [{ name: 'title', type: 'text', required: true }],
hierarchy: { parentFieldName: 'parent' },
}
Which area(s) are affected?
area: ui
Environment Info
payload: 4.0.0-beta.8
@payloadcms/ui: 4.0.0-beta.8
@payloadcms/next: 4.0.0-beta.8
next: 16.4.4
react: 19.3.1
Node: 24
- Dominant language
- TypeScript
- Stars
- 45.8k
- Forks
- 4.4k
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 251
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from payloadcms/payload
-
db-d1-sqlite: upsert is aliased to updateOne, so payload.kv.set never inserts new keysPossibly taken @pcbeingused333 claimed this today. OpenBug db: d1-sqlite Payload OSS
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
payloadcms/payload#19766 ·
Maintainers usually reply within 1 day
-
Document bar (.doc-controls__content) overflows a 375 px viewport, clips "Created" and fails axe scrollable-region-focusablePossibly taken A pull request linked to this issue is open or already merged. Openarea: ui Bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
payloadcms/payload#19690 ·
Maintainers usually reply within 1 day
-
[v4] Blocks thumbnails croped 3:2Possibly taken @samiarif02 claimed this 2 days ago. Openarea: ui Bug Payload OSS status: needs-triage v3
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
payloadcms/payload#19609 ·
Maintainers usually reply within 1 day
-
Scheduled publish jobs are not deleted when their document is deleted (string id in the job, raw id in the cleanup)Possibly taken @volodymyrshk claimed this 10 days ago. Openarea: core Bug db: sqlite
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
payloadcms/payload#19448 ·
Maintainers usually reply within 1 day
-
plugin-multi-tenant: `isGlobal` collections redirect tenant-scoped users to `/admin` since 3.93.0 (GlobalViewRedirect prop-name mismatch)Possibly taken @JarrodMFlesch claimed this 10 days ago. OpenBug plugin: multi-tenant
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
payloadcms/payload#19420 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in payloadcms/payload
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
milind-soni/OpenMausBot#6730 ·
Maintainers usually reply within 1 day
-
`@angular/[email protected]` depends on vulnerable Vite 7.3.7 - GHSA-p4f5-76q4-ffq7 (Critical RCE)Openarea: @angular/build
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
angular/angular-cli#34764 ·
Maintainers usually reply within 1 day
-
status/need-triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
google-gemini/gemini-cli#30384 · 1 comment ·
Maintainers usually reply within 1 day
-
P2
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
area:image documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day