#22856·strapi

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

  1. Create a content type with text field "title", make it required and private
  2. Create a component with text field "subtitle"
  3. Attach the component to the content type
  4. Create a new obejct in content manager and add some values to the title and subtitle
  5. Mark component text field as required and private
  6. Go to content manager, view the object and it should show error "invalid key subtitle"
  7. Remove required or private requirement from the component subtitle field
  8. 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

bash

Code Snippets

Example schemas: test content type:

json
{
  "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:

json
{
  "collectionName": "components_test_test_components",
  "info": {
    "displayName": "test_component",
    "icon": "briefcase",
    "description": ""
  },
  "options": {},
  "attributes": {
    "subtitle": {
      "type": "string",
      "required": true,
      "private": true
    }
  }
}

Media

Image

Additional information

No response

Confirmation Checklist