{"record":{"id":"aa00863599faec82","repo":"medusajs/medusa","slug":"zone-property-is-missing-at-the-j-index-of-th","errorCode":null,"errorMessage":"'zone' property is missing at the ${j} index of the 'displays' property.","messagePattern":"'zone' property is missing at the (.+?) index of the 'displays' property\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/admin/admin-vite-plugin/src/custom-fields/generate-custom-field-displays.ts","lineNumber":224,"sourceCode":"      `'displays' is not an array. The 'displays' property must be an array of objects.`,\n      { file }\n    )\n    return null\n  }\n\n  const displays: CustomFieldDisplay[] = []\n\n  displayProperty.value.elements.forEach((element, j) => {\n    if (!isObjectExpression(element)) {\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 at the ${j} index of the 'displays' property.`,\n        { file }\n      )\n      return\n    }\n\n    if (!isStringLiteral(zoneProperty.value)) {\n      logger.warn(\n        `'zone' property at index ${j} in the 'displays' property is not a string literal. 'zone' must be a string literal, e.g. 'general' or 'attributes'.`,\n        { file }\n      )\n      return\n    }\n\n    const zone = zoneProperty.value.value\n    const fullPath = getDisplayEntryPath(model, zone)\n\n    if (","sourceCodeStart":206,"sourceCodeEnd":242,"githubUrl":"https://github.com/medusajs/medusa/blob/5e06e544a296b9033f20f71f11c559f81a0e5739/packages/admin/admin-vite-plugin/src/custom-fields/generate-custom-field-displays.ts#L206-L242","documentation":"Iterating the displays array, the plugin requires each element object to contain a 'zone' property (the injection zone where the display renders). If an entry lacks zone, that entry is skipped with this warning naming the index j — other entries still process.","triggerScenarios":"A displays entry like { component: \"/src/admin/components/x\" } with no zone key; or zone misspelled (zones, injectionZone) so the AST identifier match fails.","commonSituations":"Copy-paste of partial examples; assuming zone is inherited from the parent config; renaming from older API versions where the key was named differently.","solutions":["Add zone: \"<injection-zone>\" to the displays entry at the reported index in the flagged file","Use a valid custom-field display zone string (the same ones isValidCustomFieldDisplayZone accepts)","Check spelling/casing of the key — it must be exactly zone"],"exampleFix":"// before\ndisplays: [\n  { component: \"/src/admin/custom-fields/brand/displays/name.tsx\" },\n]\n\n// after\ndisplays: [\n  {\n    zone: \"general\",\n    component: \"/src/admin/custom-fields/brand/displays/name.tsx\",\n  },\n]","handlingStrategy":"validation","validationCode":"cfg.displays.forEach((d, i) => {\n  if (typeof d.zone !== \"string\") throw new Error(`displays[${i}] missing zone`)\n})","typeGuard":"const isDisplayEntry = (d: unknown): d is { zone: string; component: string } =>\n  typeof d === \"object\" && d !== null &&\n  typeof (d as any).zone === \"string\" && typeof (d as any).component === \"string\"","tryCatchPattern":"null","preventionTips":["Include zone and component on every displays entry","Use the TypeScript type for display entries so omissions fail at compile time"],"tags":["custom-fields","display-config","injection-zone","build-warning"],"backgroundTag":"invalid-custom-field-config","analyzedSha":"5e06e544a296b9033f20f71f11c559f81a0e5739","analyzedAt":"2026-08-27T07:24:39.599Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}