twentyhq/twenty · critical · Error
Standard application is missing messageCampaign view column
Error message
Standard application is missing messageCampaign view column ${universalIdentifier} What it means
Thrown by the 2.20 add-message-campaign-stat-fields command when a messageCampaign view-column universal identifier (from the missing-view-field list) is not found in the standard application's flatViewFieldMaps via findFlatEntityByUniversalIdentifier. The command builds viewFieldsToCreate from the standard's view-field definitions; absence means the standard seed does not contain those view columns.
Source
Thrown at packages/twenty-server/src/database/commands/upgrade-version-command/2-20/2-20-workspace-command-1783525261000-add-message-campaign-stat-fields.command.ts:137
});
const viewsToCreate = this.resolveViewsToCreate({
flatViewMaps,
standardAllFlatEntityMaps,
});
const viewFieldsToCreate = CAMPAIGN_VIEW_FIELD_UNIVERSAL_IDENTIFIERS.filter(
(universalIdentifier) =>
!isDefined(flatViewFieldMaps.byUniversalIdentifier[universalIdentifier]),
).flatMap((universalIdentifier) => {
const standardViewField =
findFlatEntityByUniversalIdentifier<FlatViewField>({
flatEntityMaps: standardAllFlatEntityMaps.flatViewFieldMaps,
universalIdentifier,
});
if (!isDefined(standardViewField)) {
throw new Error(
`Standard application is missing messageCampaign view column ${universalIdentifier}`,
);
}
const fieldUniversalIdentifier =
standardAllFlatEntityMaps.flatFieldMetadataMaps.universalIdentifierById[
standardViewField.fieldMetadataId
];
if (!isDefined(fieldUniversalIdentifier)) {
return [];
}
// The standard column list keeps growing after 2.20, so skip columns whose
// field a later command introduces and backfills.
const isFieldAvailable =
isDefined(
flatFieldMetadataMaps.byUniversalIdentifier[fieldUniversalIdentifier],View on GitHub (pinned to 1f5dd2bbd2)
Solutions
- Confirm the standard seed defines the missing messageCampaign view-column universal identifiers (grep the seed).
- Rebuild and redeploy the image with the matching view-column seed.
- Verify the standard application loads correctly.
- Re-run the upgrade after redeployment.
Defensive patterns
Strategy: validation
Validate before calling
// Preflight: confirm the standard seed defines all messageCampaign view columns.
const missing = CAMPAIGN_VIEW_FIELD_UNIVERSAL_IDENTIFIERS.filter(
(id) => !isDefined(standardAllFlatEntityMaps.flatViewFieldMaps.byUniversalIdentifier[id]),
);
if (missing.length) {
throw new Error(`Image standard seed lacks messageCampaign view columns: ${missing.join(', ')}; rebuild and redeploy.`);
} Type guard
import { isDefined } from '@twenty/shared';
function standardDefinesAllViewFields(
maps: { byUniversalIdentifier: Record<string, unknown> },
ids: string[],
): boolean {
return ids.every((id) => isDefined(maps.byUniversalIdentifier[id]));
} Prevention
- Build image from a single commit so the field seed and view-column seed ship together.
- Preflight all referenced standard view-field identifiers before upgrade.
- Never cherry-pick a command without its seed updates.
When it happens
Trigger: Running the 2.20 upgrade from an image whose standard seed predates or omits the messageCampaign view columns the command expects. Note this runs after the field check (134), so the fields exist but the view-column definitions are missing.
Common situations: Code+seed mismatch where the field seed was updated but the view-column seed was not; partial deployment; loading the wrong standard application.
Related errors
- Standard application is missing messageCampaign field ${univ
- Standard application is missing messageCampaign view ${CAMPA
- Standard application is missing messageList view column ${un
- Standard application is missing the Message isDraft field me
- Failed to add messageCampaign stat fields for workspace ${wo
AI-assisted analysis of twentyhq/twenty@1f5dd2bbd2 (2026-08-12).
Data as JSON: /api/errors/e6600427046a97b1.
Report an issue: GitHub.