payload icon indicating copy to clipboard operation
payload copied to clipboard

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

Open mishery97 opened this issue 3 months ago • 0 comments

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

mishery97 avatar Aug 06 '26 05:08 mishery97