{"record":{"id":"17978b1c0365702e","repo":"medusajs/medusa","slug":"zone-property-is-missing-from-the-j-index-of-17978b","errorCode":null,"errorMessage":"'zone' property is missing from the ${j} index of the 'forms' property.","messagePattern":"'zone' property is missing from the (.+?) index of the 'forms' property\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/admin/admin-vite-plugin/src/custom-fields/generate-custom-field-forms.ts","lineNumber":533,"sourceCode":"  }\n\n  const configs: CustomFieldConfig[] = []\n\n  formArray.elements.forEach((element, j) => {\n    if (!isObjectExpression(element)) {\n      logger.warn(\n        `'forms' property at the ${j} index is malformed. The 'forms' property must be an object.`,\n        { file }\n      )\n      return\n    }\n\n    const zoneProperty = element.properties.find(\n      (p) => isObjectProperty(p) && isIdentifier(p.key, { name: \"zone\" })\n    ) as ObjectProperty | undefined\n\n    if (!zoneProperty) {\n      logger.warn(\n        `'zone' property is missing from the ${j} index of the 'forms' property.`,\n        { file }\n      )\n      return\n    }\n\n    if (isTemplateLiteral(zoneProperty.value)) {\n      logger.warn(\n        `'zone' property at the ${j} index of the 'forms' property cannot be a template literal (e.g. \\`general\\`).`,\n        { file }\n      )\n      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 }","sourceCodeStart":515,"sourceCodeEnd":551,"githubUrl":"https://github.com/medusajs/medusa/blob/5e06e544a296b9033f20f71f11c559f81a0e5739/packages/admin/admin-vite-plugin/src/custom-fields/generate-custom-field-forms.ts#L515-L551","documentation":"This is the getConfig variant of the zone check: each entry in the 'forms' array must contain a 'zone' property. When it is missing, the plugin cannot map the config to an injection point and skips the entry with this warning.","triggerScenarios":"A forms entry containing only fields: {...} or only tab: 'general', with no zone key.","commonSituations":"Minimal config examples copied from older docs, or refactoring that accidentally dropped the zone line.","solutions":["Add zone: 'general' (or another supported zone literal) to the entry at index j","Verify the key name is exactly 'zone'","Re-run the build to confirm the warning is gone"],"exampleFix":"// before\nforms: [{ tab: 'general', fields: { ... } }]\n// after\nforms: [{ zone: 'general', tab: 'general', fields: { ... } }]","handlingStrategy":"validation","validationCode":"forms.forEach((f, i) => {\n  if (typeof f.zone !== 'string') throw new Error(`forms[${i}].zone is required`)\n})","typeGuard":"const hasZone = (f: unknown): f is { zone: string } =>\n  typeof f === 'object' && f !== null && typeof (f as any).zone === 'string'","tryCatchPattern":null,"preventionTips":["Type your configs with a shared FormConfig interface requiring zone"],"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"}