{"record":{"id":"f46e296624b3e010","repo":"twentyhq/twenty","slug":"standard-application-is-missing-messagecampaign-vi-f46e29","errorCode":null,"errorMessage":"Standard application is missing messageCampaign view ${CAMPAIGN_VIEW_UNIVERSAL_IDENTIFIER}","messagePattern":"Standard application is missing messageCampaign view (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/twenty-server/src/database/commands/upgrade-version-command/2-20/2-20-workspace-command-1783525261000-add-message-campaign-stat-fields.command.ts","lineNumber":243,"sourceCode":"  }: {\n    flatViewMaps: WorkspaceCacheDataMap['flatViewMaps'];\n    standardAllFlatEntityMaps: TwentyStandardAllFlatEntityMaps;\n  }): FlatView[] {\n    if (\n      isDefined(\n        flatViewMaps.byUniversalIdentifier[CAMPAIGN_VIEW_UNIVERSAL_IDENTIFIER],\n      )\n    ) {\n      return [];\n    }\n\n    const standardView = findFlatEntityByUniversalIdentifier<FlatView>({\n      flatEntityMaps: standardAllFlatEntityMaps.flatViewMaps,\n      universalIdentifier: CAMPAIGN_VIEW_UNIVERSAL_IDENTIFIER,\n    });\n\n    if (!isDefined(standardView)) {\n      throw new Error(\n        `Standard application is missing messageCampaign view ${CAMPAIGN_VIEW_UNIVERSAL_IDENTIFIER}`,\n      );\n    }\n\n    return [standardView];\n  }\n}\n","sourceCodeStart":225,"sourceCodeEnd":251,"githubUrl":"https://github.com/twentyhq/twenty/blob/1f5dd2bbd2a8da3419c8cfd52dd545c0024df1a6/packages/twenty-server/src/database/commands/upgrade-version-command/2-20/2-20-workspace-command-1783525261000-add-message-campaign-stat-fields.command.ts#L225-L251","documentation":"Thrown by resolveViewsToCreate in the 2.20 add-message-campaign-stat-fields command when the standard application's flatViewMaps do not contain the CAMPAIGN_VIEW_UNIVERSAL_IDENTIFIER view. Like 134/135, this is a standard-seed failure: the command assumes the standard defines the messageCampaign view, but it is absent.","triggerScenarios":"Running the 2.20 upgrade from an image whose standard seed does not define the messageCampaign view (CAMPAIGN_VIEW_UNIVERSAL_IDENTIFIER). Cherry-picking the command without its view-seed update.","commonSituations":"Code+seed version mismatch; build that excluded the view-seed module; partial deployment.","solutions":["Confirm the standard seed defines the CAMPAIGN_VIEW_UNIVERSAL_IDENTIFIER view (grep the seed source).","Rebuild and redeploy the image with the matching view seed.","Verify the standard application loads correctly.","Re-run the upgrade after redeployment."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Preflight: confirm the standard seed defines the messageCampaign view.\nif (!isDefined(standardAllFlatEntityMaps.flatViewMaps.byUniversalIdentifier[CAMPAIGN_VIEW_UNIVERSAL_IDENTIFIER])) {\n  throw new Error('Image standard seed lacks messageCampaign view; rebuild and redeploy.');\n}","typeGuard":"import { isDefined } from '@twenty/shared';\n\nfunction standardDefinesView(\n  maps: { byUniversalIdentifier: Record<string, unknown> },\n  viewId: string,\n): boolean {\n  return isDefined(maps.byUniversalIdentifier[viewId]);\n}","tryCatchPattern":null,"preventionTips":["Build image from a single commit so the view seed ships with the command.","Preflight all referenced standard view identifiers before upgrade.","Never cherry-pick a command without its seed updates."],"tags":["migration","workspace-upgrade","standard-seed","missing-metadata","view","message-campaign"],"backgroundTag":null,"analyzedSha":"1f5dd2bbd2a8da3419c8cfd52dd545c0024df1a6","analyzedAt":"2026-08-12T15:37:27.593Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}