Invalid key in content manager for required and private component fields
Author: SamuliPolviCreated Feb 11, 2025Updated Sep 24, 2026
Labelsissue: bugseverity: mediumsource: core:content-managerstatus: pending reproductionversion: 5
Node Version
20.13.1
NPM/Yarn/PNPM Version
Yarn 1.22.22
Strapi Version
5.9.0
Operating System
Windows 11
Database
SQLite
Javascript or Typescript
Typescript
Reproduction URL
No response
Bug Description
Having a required and private field in component causes "invalid key" error in content manager. Removing required or private will remove the error, but having both of them gives "invalid key", even if the field has data. API queries work just fine. Bug only happens in content types with component (nested fields) but not at top level.
test.title = no error test.some_component.field = error
Steps to Reproduce
- Create a content type with text field "title", make it required and private
- Create a component with text field "subtitle"
- Attach the component to the content type
- Create a new obejct in content manager and add some values to the title and subtitle
- Mark component text field as required and private
- Go to content manager, view the object and it should show error "invalid key subtitle"
- Remove required or private requirement from the component subtitle field
- Go to content manager and view the object, it should not throw error
Expected Behavior
Component fields with required and private should not throw invalid key error when viewed in content manager.
Logs
Code Snippets
Example schemas: test content type:
{
"kind": "collectionType",
"collectionName": "tests",
"info": {
"singularName": "test",
"pluralName": "tests",
"displayName": "test"
},
"options": {
"draftAndPublish": false
},
"pluginOptions": {},
"attributes": {
"title": {
"type": "string",
"required": true,
"private": true
},
"subtitle_test": {
"displayName": "test_component",
"type": "component",
"repeatable": false,
"component": "test.test-component"
}
}
}
component:
{
"collectionName": "components_test_test_components",
"info": {
"displayName": "test_component",
"icon": "briefcase",
"description": ""
},
"options": {},
"attributes": {
"subtitle": {
"type": "string",
"required": true,
"private": true
}
}
}Media
Additional information
No response
Confirmation Checklist
- I have checked the existing issues for duplicates.
- I agree to follow this project's Code of Conduct.
Source: strapi/strapi