Error when saving a Marketing Automation campaign


Description

In the Marketing Automation application, saving a campaign might fail with an error that appears on the Dashboard:

Http failure response for https://[your_site_name]/sitecore/api/ma/plans/?cultureName=en: 500 OK

The following message can be found in the logs:

ERROR [Sitecore Services]: HTTP POST
URL https://[your_site_name]/sitecore/api/ma/plans/?cultureName=en

Exception System.ArgumentNullException: activityType should not be null.
Parameter name: activityType
   at Sitecore.Framework.Conditions.RequiresValidator`1.ThrowExceptionCore(String condition, String additionalMessage, ConstraintViolationType type)
   at Sitecore.Framework.Conditions.Throw.ValueShouldNotBeNull[T](ConditionValidator`1 validator, String conditionDescription)
   at Sitecore.Framework.Conditions.ValidatorExtensions.IsNotNull[T](ConditionValidator`1 validator)
   at Sitecore.Marketing.Automation.Extensions.AutomationActivityDefinitionViewModelExtensions.ToDomainModel(AutomationActivityDefinitionViewModel viewModel, IActivityDescriptor activityType, CultureInfo culture, IActivityConverterFactory`1 activityConverterFactory, BaseLog logger, Boolean validate)
   at Sitecore.Marketing.Automation.Extensions.AutomationPlanDefinitionViewModelExtensions.ToDomainModel(AutomationPlanDefinitionViewModel viewModel, IActivityDescriptorLocator activityDescriptorLocator, CultureInfo culture, IActivityConverterFactory`1 activityConverterFactory, BaseLog logger, Boolean activate, DateTime createdAt, DateTime lastModifiedDate, IAutomationPlanDefinition existingPlan)
   at Sitecore.Marketing.Automation.Data.AutomationPlanRepository.<Add>d__11.MoveNext()

The issue occurs if the language attribute for the "website" site definition or for a custom site definition is defined other than "en" (English).

Solution

To resolve the issue, for Sitecore XP 9.3, download and install the hotfix: SC Hotfix 469172-1.zip.

Be aware that the hotfix was built for the specific Sitecore XP version and must not be installed on other Sitecore XP versions or in combination with other hotfixes. In case any other hotfixes have already been installed on a certain Sitecore XP instance, send a request for a compatibility check to Sitecore Support.

Note that the ZIP file contents must be extracted to locate installation instructions and related files inside. The hotfix must be installed on a CM instance and then synced with other instances using standard development practices.