payloadcms / payloadcms/payload

Bulk edit's folder picker titles itself "Select folder for [Untitled]"

Open Beginner friendly
#17,669 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
44.8k
Forks
4.2k
Avg merge
2d 21h
Merged PRs (30d)
53

Description

Describe the Bug

When the folder field is edited via bulk edit (EditMany), the folder-select drawer renders its heading from the document title — but in bulk context there is no document, so useDocumentInfo() falls back to general:untitled and every editor sees:

Select folder for [Untitled]

This reads as a bug ("why is my image untitled?") — especially confusing because the user may have a single, clearly-named document selected. The sibling flow already handles this correctly: moving items from the By Folder view titles the drawer "Moving 1 Item from X" / "Select folder for N Items" using counts.

The chip that opens the drawer has the same problem one level down: the bulk-edit folder field renders the folder:noFolder label even when every selected document is in a folder, because bulk-edit fields are setters that don't load current values — combined with the [Untitled] heading, editors reasonably conclude the picker is broken.

Reproduction steps

  1. Upload collection with folders: true.
  2. List view → select one or more documents → Edit → add the Folder field → click the folder chip.
  3. Drawer heading: "Select folder for [Untitled]".

Expected / Actual

  • Expected: a count-based heading in bulk context, e.g. "Select folder for 1 Item" / "3 Items" — matching the Move flow's existing behaviour.
  • Actual: "[Untitled]", from a document-title lookup that has no document.

Proposed fix

In the bulk-edit folder field's drawer invocation, pass a count-based title (the translation keys used by the Move flow already exist) instead of falling through to useDocumentInfo().title.

Environment

  • Payload: 3.86.0 (found), verified still present in 3.87.0 source
  • @payloadcms/db-postgres, @payloadcms/next
  • Next.js: 16.2.11
  • Node: 22.14.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the bulk-edit folder field's drawer invocation and compare it with the Move flow's existing count-based title translations. Verify the drawer heading uses the selected-item count rather than document info, then confirm the reproduction no longer shows [Untitled].

Written by the indexing model from the issue text.

Assessment

Tech stack
nextjs, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.