This happens if the configuration file of your product definition did not get upgraded. Run the script below to add the required configurations:
private void TurnOnWorkflowSupportForProductsAndRemoveMisSectionAndAddContentLocationSideBar(SiteInitializer initializer)
{
using (var catalogManager = CatalogManager.GetManager())
{
var definitionManager = new CatalogDefinitionManager();
var productTypes = catalogManager.GetProductTypes();
foreach (ProductType type in productTypes)
{
definitionManager.UpdateProductDefinitionsToHaveWorkflowSupport(type);
definitionManager.UpdateProductDefinitionsToHaveContentLocationSideBar(type);
definitionManager.UpdateProductDefinitionsAndRemoveIsActive(type);
definitionManager.SaveChanges();
}
}
}
using Telerik.Sitefinity.Configuration;
using Telerik.Sitefinity.Ecommerce.Catalog.Model;
using Telerik.Sitefinity.Workflow.Configuration;
namespace Telerik.Sitefinity.Modules.Ecommerce.Catalog.Workflows
{
internal class CustomProductTypeWorkflowInstaller : IProductTypeWorkflowInstaller
{
public void InstallWorkflowForProductType(ProductType productType)
{
this.InstallWorkflowForProductType(productType, ConfigManager.GetManager());
}
public void InstallWorkflowForProductType(ProductType productType, ConfigManager configManager)
{
var workflowConfig = Config.Get<WorkflowConfig>();
var workflowElement = new WorkflowElement()
{
ContentType = productType.ClrType,
ServiceUrl = ProductsWorkflowUrlResolver.GetDefaultWorkflowUrl(typeof(Product)),
Title = productType.GetDisplayForWorkflowAndSiteSync(),
ModuleName = EcommerceModule.moduleName
};
if (!workflowConfig.Workflows.Contains(productType.ClrType))
{
workflowConfig.Workflows.Add(workflowElement);
configManager.SaveSection(workflowConfig);
}
}
}
}