{"record":{"id":"22a8e0d650502255","repo":"medusajs/medusa","slug":"zone-property-at-the-j-index-of-the-forms-p-22a8e0","errorCode":null,"errorMessage":"'zone' property at the ${j} index of the 'forms' property is not a valid custom field form zone for the '${model}' model. Received: ${zone}.","messagePattern":"'zone' property at the (.+?) index of the 'forms' property is not a valid custom field form zone for the '(.+?)' model\\. Received: (.+?)\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/admin/admin-vite-plugin/src/custom-fields/generate-custom-field-forms.ts","lineNumber":563,"sourceCode":"      return\n    }\n\n    if (!isStringLiteral(zoneProperty.value)) {\n      logger.warn(\n        `'zone' property at the ${j} index of the 'forms' property is not a string literal (e.g. 'general' or 'attributes').`,\n        { file }\n      )\n      return\n    }\n\n    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[] = []","sourceCodeStart":545,"sourceCodeEnd":581,"githubUrl":"https://github.com/medusajs/medusa/blob/5e06e544a296b9033f20f71f11c559f81a0e5739/packages/admin/admin-vite-plugin/src/custom-fields/generate-custom-field-forms.ts#L545-L581","documentation":"Even with a string literal zone, the plugin validates it with isValidCustomFieldFormZone and checks the resulting config path (getFormEntryConfigPath) for the model. An unrecognized zone or missing path triggers this warning, showing the received value, and the entry is skipped.","triggerScenarios":"zone: 'metadata' or another unsupported zone name for the model, or a zone whose generated config path does not exist in that Medusa version.","commonSituations":"Typos, zones valid for a different model, or version drift after upgrading Medusa when zone names changed.","solutions":["Use a documented zone for the model, typically 'general' or 'attributes'","Verify available zones in your Medusa version's admin custom-fields docs","Fix typos in the zone string"],"exampleFix":"// before\nforms: [{ zone: 'metadata', fields: { ... } }]\n// after\nforms: [{ zone: 'general', fields: { ... } }]","handlingStrategy":"validation","validationCode":"import { isValidCustomFieldFormZone } from '@medusajs/admin-shared'\nif (!isValidCustomFieldFormZone(f.zone)) {\n  throw new Error(`zone '${f.zone}' is not supported for model '${model}'`)\n}","typeGuard":"const isKnownZone = (z: string) => isValidCustomFieldFormZone(z)","tryCatchPattern":null,"preventionTips":["Default to 'general' unless docs list other zones for the model","Re-validate zones after upgrading Medusa"],"tags":["admin","custom-fields","zone-validation","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"}