{"record":{"id":"3e69519048cb5197","repo":"medusajs/medusa","slug":"fields-property-is-missing-from-the-j-entry-i","errorCode":null,"errorMessage":"'fields' property is missing from the ${j} entry in the 'forms' property in ${file}.","messagePattern":"'fields' property is missing from the (.+?) entry in the 'forms' property in (.+?)\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/admin/admin-vite-plugin/src/custom-fields/generate-custom-field-forms.ts","lineNumber":574,"sourceCode":"    const zone = zoneProperty.value.value\n    const fullPath = getFormEntryConfigPath(model, zone)\n\n    if (\n      !isValidCustomFieldFormZone(zone) ||\n      !isValidCustomFieldFormConfigPath(fullPath)\n    ) {\n      logger.warn(\n        `'zone' property at the ${j} index of the 'forms' property is not a valid custom field form zone for the '${model}' model. Received: ${zone}.`\n      )\n      return\n    }\n\n    const fieldsObject = element.properties.find(\n      (p) => isObjectProperty(p) && isIdentifier(p.key, { name: \"fields\" })\n    ) as ObjectProperty | undefined\n\n    if (!fieldsObject) {\n      logger.warn(\n        `'fields' property is missing from the ${j} entry in the 'forms' property in ${file}.`,\n        { file }\n      )\n      return\n    }\n\n    const fields: CustomFieldConfigField[] = []\n\n    if (!isObjectExpression(fieldsObject.value)) {\n      logger.warn(\n        `'fields' property at the ${j} index of the 'forms' property is malformed. The 'fields' property must be an object.`,\n        { file }\n      )\n      return\n    }\n\n    fieldsObject.value.properties.forEach((field) => {\n      if (!isObjectProperty(field) || !isIdentifier(field.key)) {","sourceCodeStart":556,"sourceCodeEnd":592,"githubUrl":"https://github.com/medusajs/medusa/blob/5e06e544a296b9033f20f71f11c559f81a0e5739/packages/admin/admin-vite-plugin/src/custom-fields/generate-custom-field-forms.ts#L556-L592","documentation":"In the getConfig flow, every 'forms' entry must include a 'fields' object. When the entry at index j has no fields key, the plugin warns (including the source file) and skips the entry, since there is nothing to generate configuration for.","triggerScenarios":"forms: [{ zone: 'general' }] with no fields, or the key misspelled as 'Fields'/'field'.","commonSituations":"Template configs left half-finished, refactors renaming the key, or merging configs that dropped fields.","solutions":["Add fields: { ... } as a sibling of zone/tab in the entry","Check the spelling and case of the property name","Ensure fields is not accidentally nested inside another property"],"exampleFix":"// before\nforms: [{ zone: 'general', tab: 'general' }]\n// after\nforms: [{ zone: 'general', tab: 'general', fields: { myField: { ... } } }]","handlingStrategy":"validation","validationCode":"forms.forEach((f, i) => {\n  if (!f.fields || typeof f.fields !== 'object') {\n    throw new Error(`forms[${i}] is missing a fields object`)\n  }\n})","typeGuard":"const hasFieldsKey = (f: unknown): f is { fields: object } =>\n  typeof f === 'object' && f !== null && 'fields' in (f as object)","tryCatchPattern":null,"preventionTips":["Define a FormConfig type with required fields and use it in every admin config file"],"tags":["admin","custom-fields","config-validation"],"backgroundTag":"admin-custom-field-form-validation","analyzedSha":"5e06e544a296b9033f20f71f11c559f81a0e5739","analyzedAt":"2026-08-27T07:24:39.599Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}