[v4 beta] Hierarchy collection won't load when its title field is inside tabs
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- mongodb, typescript
- Domain
- backend
Research direction
Start with packages/payload/src/hierarchy/utils/findUseAsTitle.ts, especially the tab and nested-field lookup around lines 70–87. Use src/collections/Sections.ts from the linked reproduction and run REPRO_TITLE_IN_TABS=1 pnpm dev or pnpm repro:title-in-tabs to confirm the failure. Done means a hierarchy title inside an unnamed tab, row, collapsible, or group is found without nonmatching nested containers throwing; note that linked pull request #18817 is already open.
Written by the indexing model from the issue text.
Description
Describe the Bug
What you see: with this collection in the config, the whole admin and API fail with:
Error: The hierarchy title field "name" was not found. It cannot be nested within named fields i.e. named groups, named tabs, etc.

export const Sections: CollectionConfig = {
slug: 'sections',
admin: { useAsTitle: 'name' },
hierarchy: { parentFieldName: 'parent' },
fields: [
{
type: 'tabs',
tabs: [
{ label: 'General', fields: [{ name: 'name', type: 'text', required: true }] },
{ label: 'Details', fields: [{ name: 'description', type: 'textarea' }] },
],
},
],
}
Expected: it loads. name is in an unnamed tab, which the error message itself says is allowed. It fails in either tab (putting General last gives the same error), and only loads once name is moved out of the tabs.
Why: hierarchy/utils/findUseAsTitle.ts searches every tab. Searching a tab that doesn't contain the field throws (L87) instead of returning nothing, so whichever tab doesn't hold name throws, even when another tab has a match. An unnamed row, collapsible or group without the field throws the same way.
Link to the code that reproduces this issue
https://github.com/AaronClaes/payload-v4-hierarchy-repro
Reproduction Steps
Needs a local MongoDB. The Sections collection above is in src/collections/Sections.ts, and is only added to the config when REPRO_TITLE_IN_TABS=1.
- Clone the repo, then run
cp .env.example .envandpnpm install. - Run
REPRO_TITLE_IN_TABS=1 pnpm devand open/admin. The error above shows.
pnpm repro:title-in-tabs shows the same error without starting the admin.
Which area(s) are affected?
area: core
Environment Info
Binaries:
Node: 24.15.0
pnpm: 10.17.1
Relevant Packages:
payload: 4.0.0-beta.2
next: 16.4.2
@payloadcms/db-mongodb: 4.0.0-beta.2
@payloadcms/ui: 4.0.0-beta.2
react: 19.3.1
react-dom: 19.3.1
Database: MongoDB 8.3.7
Operating System:
Platform: darwin (arm64)
- Dominant language
- TypeScript
- Stars
- 45.5k
- Forks
- 4.3k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 309
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
-
Grid view: show the file placeholder when a thumbnail image fails to loadPossibly taken @lazerg claimed this today. OpenBug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
payloadcms/payload#19181 ·
Maintainers usually reply within 1 day
-
WhereBuilder throws "Cannot read properties of undefined (reading 'value')" when the list URL filters on a field that is not filterablePossibly taken A pull request linked to this issue is open or already merged. OpenBug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
payloadcms/payload#19002 · 1 comment ·
Maintainers usually reply within 1 day
-
Regression: `findByID` with `disableErrors: true` throws `NotFound` for null/empty ids since 3.91.0Possibly taken @Krrishkumar125 claimed this 7 days ago. Openarea: core Bug invalid-reproduction status: needs-triage v3
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
payloadcms/payload#18935 · 2 comments ·
Maintainers usually reply within 1 day
-
bug: Local API call with req resets req.fallbackLocale to defaultLocalePossibly taken A pull request linked to this issue is open or already merged. Openarea: core Bug created-by: Contributor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
payloadcms/payload#18768 ·
Maintainers usually reply within 1 day
-
[plugin-multi-tenant] Infinite redirect loop with custom tenantFieldName and isGlobal collectionsPossibly taken A pull request linked to this issue is open or already merged. OpenBug plugin: multi-tenant status: needs-triage v3
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
payloadcms/payload#18690 ·
Maintainers usually reply within 1 day
All issues in payloadcms/payload
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
marmelab/react-admin#11431 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
db-ux-design-system/core-web#8655 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
stripe/react-stripe-js#728 ·
-
[Upload Grade C dataset] the pop-up changes it's size while uploading the document => Jumping effectOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
epam/statgpt-admin-frontend#305 ·
Maintainers usually reply within 1 day