Breaking changes in Optimizely Forms 6.0.0
Describes breaking changes when upgrading from EPiServer.Forms 5.x to the major version 6.0.0.
When you upgrade to Optimizely Forms 6.0.0 (EPiServer.Forms 6.0.0), breaking changes can disrupt or alter your existing code, integrations, or customizations. Address each breaking change to ensure a smooth transition and continued Forms operation.
Important
- Optimizely Forms 6.0.0 targets CMS 13. Many breaking API changes result from CMS 13 in addition to Forms-specific changes.
- The
PropertyGenericList<T>serialization format change is high risk. Test existing form data before upgrading.- Subclasses that accessed
Injected<>fields directly onFormBusinessService,FormContainerBlockController, and similar classes may need updates.- Subclasses of
DecryptedCSVDataExporterorAzureKeyVaultCryptoEngineshould verify constructor compatibility.- Optimizely Forms 6.0.0 is not designed to work with Experience.
Breaking changes
Removed EPiServer.AddOns.Helpers NuGet package
EPiServer.AddOns.Helpers NuGet package- Type – Removed.
- Details – Deleted the
EPiServer.AddOns.Helpersproject. Its helper types (ContentExtensions,UriExtensions) were moved into core Forms assemblies. - Impact – Code referencing
EPiServer.AddOns.Helpersas a NuGet dependency will fail to build. - Migration – Remove the package reference. If your code uses helper methods that are not part of the public API (such as
ContentExtensions.GetPropertyValueAsStringorUriExtensions.IsValidUri), reimplement the required behavior using supported public APIs. For content property value retrieval, use standard CMS APIs or create custom helper methods built on those APIs. For URI validation, useSystem.Uri.TryCreate()or similar .NET APIs.
Removed IEPiServerFormsCoreConfig interface
IEPiServerFormsCoreConfig interface- Type – Removed.
- Details – Deleted
EPiServer.Forms.Core.IEPiServerFormsCoreConfigandEPiServerFormsCoreConfig. - Impact – Code injecting or implementing
IEPiServerFormsCoreConfigwill fail to compile. - Migration – Use
FormsConfigOptions(options class, configurable inappsettings.jsonunder theFormskey).
Removed EPiServerFormsUIConfig class
EPiServerFormsUIConfig class- Type – Removed.
- Details – Deleted
EPiServer.Forms.UI.EPiServerFormsUIConfig. - Impact – Code injecting
IEPiServerFormsUIConfigwill fail to compile. - Migration – Use
FormsConfigOptions.
Removed legacy XML configuration
- Type – Removed.
- Details – Removed the entire
EPiServer.Forms.Configurationnamespace,Forms.config, and allTransform/classes. - Impact –
Forms.configsettings are ignored. Code using theEPiServer.Forms.Configurationnamespace fails to compile. - Migration – Move all settings to
appsettings.jsonunder theFormskey. SeeFormsConfigOptionsfor all available properties.
Changed InitializationModule to no longer implement IConfigurableModule
InitializationModule to no longer implement IConfigurableModule- Type – Changed.
- Details – Changed
EPiServer.Forms.EditView.InitializationModulefromIConfigurableModuletoIInitializableModule. RemovedConfigureContainer(). DeletedEPiServer.Forms.InitializationModule. - Impact – Code depending on
ConfigureContainerbeing called will break. - Migration – Call
services.AddForms(),services.AddFormsUI(), orservices.AddFormsCore()inProgram.cs.
Required explicit DI registration
- Type – Breaking (DI configuration).
- Details – Services are no longer auto-registered with
[ServiceConfiguration]. The following new extension methods are required:services.AddFormsCore()— Core services.services.AddFormsUI()— UI services (callsAddFormsCore).services.AddForms()— Full stack (callsAddFormsUI).services.AddFormsCryptoAzureKeyVault()— Azure Key Vault crypto.
- Impact – Missing registration causes a runtime
InvalidOperationExceptionwith an "Unable to resolve service..." message. - Migration – Call
services.AddForms()inProgram.csorStartup.cs.
Removed IPostSubmissionActor.ActiveExternalFieldMappingTable
IPostSubmissionActor.ActiveExternalFieldMappingTable- Type – Removed.
- Details – Removed
IDictionary<string, RemoteFieldInfo>ActiveExternalFieldMappingTablefromIPostSubmissionActorand its base class (previously marked[Obsolete]). - Impact – Custom actors reading this property fail to compile.
- Migration – Inject
IExternalFieldMappingServiceand callGetActiveFieldMappingTable(FormIdentity)directly.
Removed IExternalFieldMappingService.GetAllExternalSystems()
IExternalFieldMappingService.GetAllExternalSystems()- Type – Removed.
- Details – Removed the method (previously marked
[Obsolete]). - Impact – Callers fail to compile.
- Migration – Use
ExternalSystemService.GetAllExternalSystems().
Removed [ServiceConfiguration] from FormsEvents and CryptoEngineFactory
[ServiceConfiguration] from FormsEvents and CryptoEngineFactory- Type – Changed.
- Details – Both classes no longer carry
[ServiceConfiguration]attributes. They are registered throughAddFormsCore(). - Impact – If
AddFormsCore()is not called, these services are not registered. - Migration – Call
services.AddFormsCore().
Removed obsolete methods from FormBusinessService
FormBusinessService- Type – Removed.
- Details – Removed the following methods (all previously marked
[Obsolete]):ReCalculateStepIndexIfNeeded(FormIdentity, FormContainerBlock, Submission, int, Guid, bool)IsMatchDependCondition(IElementDependant, IDictionary<string, object>)ReCalculateStepIndex(FormContainerBlock, int, IDictionary<string, object>, bool)BuildStepsAndElements(FormContainerBlock, bool)(legacy overload)ToHtmlStringWithFriendlyUrls(XhtmlString)ReplaceFragmentWithFriendlyUrls(IStringFragment)GetFriendlyUrl(IStringFragment)(protected virtual)
- Impact – Callers fail to compile.
- Migration – Use the replacement methods documented in the original
[Obsolete]messages.
Removed DataSubmissionHelper.ValidateFormSubmittableStatus four-parameter overload
DataSubmissionHelper.ValidateFormSubmittableStatus four-parameter overload- Type – Removed.
- Details – Removed
ValidateFormSubmittableStatus(FormContainerBlock, string, HttpContext, out string)(previously marked[Obsolete]). - Impact – Callers fail to compile.
- Migration – Use the five-parameter overload and add the
string submissionGuidparameter.
Removed FormsExtensionsUI.RenderWebFormViewToString
FormsExtensionsUI.RenderWebFormViewToString- Type – Removed.
- Details – Removed
RenderWebFormViewToString<TModel>(ControllerContext, string, TModel, IDictionary<string, object>). - Impact – Callers fail to compile.
- Migration – Use standard ASP.NET Core view rendering.
Removed FormsExtensionsUI.RenderFormElements
FormsExtensionsUI.RenderFormElements- Type – Removed.
- Details – Removed
RenderFormElements(IHtmlHelper, int, IEnumerable<IFormElement>). - Impact – Callers fail to compile.
- Migration – Use
EPiServer.Forms.Helpers.Internal.HtmlExtensions.RenderFormElements().
Removed IExcludeValidatorTypes interface
IExcludeValidatorTypes interface- Type – Removed.
- Details – Removed
EPiServer.Forms.EditView.IExcludeValidatorTypesandValidatorTypesToBeExcluded(previously marked[Obsolete]since Forms 3.0). Also removed support logic inValidationService. - Impact – Element blocks implementing
IExcludeValidatorTypesfail to compile. - Migration – Use
IAvailableValidatorTypesAttributeinstead.
Removed ExternalSystemEditorDescriptors.GetSelectedFieldsName(FormIdentity, string)
ExternalSystemEditorDescriptors.GetSelectedFieldsName(FormIdentity, string)- Type – Removed.
- Details – Removed the protected
GetSelectedFieldsName(FormIdentity, string)overload (previously marked[Obsolete]). - Impact – Subclasses calling this overload fail to compile.
- Migration – Use
GetSelectedFieldsName(FormContainerBlock, ElementBlockBase, string).
Removed protected virtual event handlers from InitializationModule
InitializationModule- Type – Removed.
- Details – Removed
Instance_DeletedContentandInstance_PublishedContent(previously marked[Obsolete]). - Impact – Subclasses overriding these methods fail to compile.
- Migration – Override methods in
_cmsEventsHandleror subscribe to CMS events directly.
Removed FormsExtensions.HasAnyExternalSystem()
FormsExtensions.HasAnyExternalSystem()- Type – Removed.
- Details – Removed
FormsExtensions.HasAnyExternalSystem(). - Impact – Callers fail to compile.
- Migration – Use
ExternalSystemService.HasExternalSystem().
Removed FormsExtensions.GetContent(ContentReference, string) overload
FormsExtensions.GetContent(ContentReference, string) overload- Type – Removed.
- Details – Removed
FormsExtensions.GetContent(ContentReference, string)overload. - Impact – Callers fail to compile.
- Migration – Use
GetContent(ContentReference, bool shouldFallbackWithMaster, string language).
Removed FormsExtensions.SplitBySeparator
FormsExtensions.SplitBySeparator- Type – Removed.
- Details – Removed
FormsExtensions.SplitBySeparator. - Impact – Callers fail to compile.
- Migration – Use
SplitBySeparators(this string, string[]).
Removed PropertyBag Data from IForm.Data and Form.Data
PropertyBag Data from IForm.Data and Form.Data- Type – Removed.
- Details – Removed
PropertyBag DatafromIFormandForm(previously marked[Obsolete]since Forms 5.0). - Impact – Callers fail to compile.
- Migration – Use
Submission.Data(IDictionary<string, object>).
Changed [ScheduledPlugIn] to [ScheduledJob]
[ScheduledPlugIn] to [ScheduledJob]- Type – Changed.
- Details –
ExpiredFormSubmissionRemoveJob,UpdateMissingValueOfRetentionPolicyJob, andUpdateUploadFolderACLJobnow use[ScheduledJob](CMS 13) and are internal. - Impact – External code referencing these types fails to compile.
- Migration – Do not reference these types directly. Use
IScheduledJobRepositoryor the CMS UI.
Changed [PropertyDefinitionTypePlugIn] to [PropertyDefinitionType] on all specialized properties
[PropertyDefinitionTypePlugIn] to [PropertyDefinitionType] on all specialized properties- Type – Changed.
- Details – Changed all
SpecializedPropertiesclasses from[PropertyDefinitionTypePlugIn]to[PropertyDefinitionType]. Removed spaces from display names (for example, Message Template became MessageTemplate). - Impact – Database property definition mismatches on upgrade from CMS 12.
- Migration – Verify property definitions in the CMS database after upgrading.
Changed PropertyGenericList.SaveData() signature
PropertyGenericList.SaveData() signature- Type – Changed.
- Details – Changed
SaveData(PropertyDataCollection)to the parameterlessSaveData()in the CMS 13 API. - Impact – Subclasses overriding
SaveData(PropertyDataCollection)fail to compile. - Migration – Override the parameterless
SaveData().
Changed FreeGeolocationProvider to no longer inherit GeolocationProviderBase
FreeGeolocationProvider to no longer inherit GeolocationProviderBase- Type – Changed.
- Details –
FreeGeolocationProvidernow implementsICustomGeolocationProviderandIGeolocationProviderdirectly. RemovedInitialize(string, NameValueCollection). ConfiguregeoApiUrlwith options or dependency injection (DI). - Impact – XML-based geo provider configuration stops working without error.
- Migration – Configure the geo API URL in
appsettings.json.
Replaced IPageRouteHelper with IContentRouteHelper
IPageRouteHelper with IContentRouteHelper- Type – Changed.
- Details –
FormsExtensions.GetCurrentPageLink()now usesIContentRouteHelper(CMS 13). - Impact – Potential behavioral difference in edge cases with non-page content.
- Migration – No code change is required unless you overrode this method.
Removed SaveDataToStorageActor parameterless constructor
SaveDataToStorageActor parameterless constructor- Type – Removed.
- Details – Removed
SaveDataToStorageActorparameterless constructor. - Impact –
new SaveDataToStorageActor()fails to compile. - Migration – Let the DI container resolve
SaveDataToStorageActor.
Replaced Newtonsoft.Json dependency with System.Text.Json
Newtonsoft.Json dependency with System.Text.Json- Type – Removed and changed.
- Details – Replaced all
Newtonsoft.JsonwithSystem.Text.Json.PropertyGenericList<T>now usesSystem.Text.Json.[JsonIgnore]is nowSystem.Text.Json.Serialization.JsonIgnore. - Impact – Custom model types in
PropertyGenericList<T>that relied onNewtonsoft.Jsonconventions may serialize or deserialize differently. - Migration – Review custom types for
System.Text.Jsoncompatibility, including differences in attributes, constructor requirements, and so on.
Removed obsolete methods from SendEmailAfterSubmissionActor
SendEmailAfterSubmissionActor- Type – Removed.
- Details – Removed
GetFriendlySummaryTextandGetPredefinedPlaceHolders(previously marked[Obsolete]since Forms 4.4). - Impact – Subclasses overriding these methods fail to compile.
- Migration – This logic now lives in
DefaultPlaceHolderProvider. Remove the overrides.
Enhancements
IFormEventsRaiserandDefaultFormEventsRaiser– Added a newIFormEventsRaiserinterface inEPiServer.Forms.Core.Events, which addsOnFormSubmittedEventandOnFormSubmittingEvent.OnFormSubmittingEventreturns the new record typeFormSubmittingResult.ContentReferenceJsonConverter– AddedEPiServer.Forms.Core.Serialization.ContentReferenceJsonConverterin the public API, which lets you enableSystem.Text.Jsonserialization ofContentReferenceinsidePropertyGenericList<T>.XhtmlStringJsonConverter– AddedEPiServer.Forms.UI.Internal.XhtmlStringJsonConverter, which supportsXhtmlStringserialization insidePropertyGenericList<T>.- TinyMCE placeholder plugin – Registered the new TinyMCE plugin for
ParagraphTextElementBlock, which lets you insert form field placeholders in Visual Builder mode rich-text editing. FormsSmtpClient– Added new internalFormsSmtpClient, which uses MailKit and addsReplyTofield support for email actors.- Visual Builder mode improvements – Improved and corrected the functionality of the dependency field dialog, field selector, validators editor, default view for form elements, and sticky view preferences in Visual Builder mode.
AddFormsCryptoAzureKeyVault– AddedAzureKeyVaultServiceCollectionExtensions.AddFormsCryptoAzureKeyVault(IServiceCollection)extension method, which provides explicit Azure Key Vault DI registration.
Non-breaking changes
- Updated
AesCryptoto useAes.Create()instead of the obsoleteAesManaged. - Added non-generic
Encrypt(SymmetricAlgorithm, byte[])andDecrypt(SymmetricAlgorithm, byte[])overloads toSymmetricCryptoBase. - Converted
FormCryptoEngineBase,FormRepository,FormDataRepository,DataSubmissionHelper,DataSubmissionService, andFormContainerBlockControllerfromInjected<>to constructor injection. - Updated
FormsExtensions.Reflection.csto scanAppDomain.CurrentDomain.GetAssemblies()and filter out Castle DynamicProxy proxy classes. - Updated
FreeGeolocationProviderto useSystem.Text.Json.JsonDocumentfor geo API response parsing. - Improved styles for Visual Builder mode.
- Replaced
IPlugInDescriptorRepositorywithIScheduledJobRepository(CMS 13 API). - Replaced
context.Locate.Advancedwithcontext.Services(CMS 13 API).
API changes summary
Added
EPiServer.DependencyInjection.ServiceCollectionExtensions.AddFormsCore(IServiceCollection)EPiServer.DependencyInjection.ServiceCollectionExtensions.AddFormsUI(IServiceCollection)EPiServer.DependencyInjection.ServiceCollectionExtensions.AddForms(IServiceCollection)EPiServer.DependencyInjection.AzureKeyVaultServiceCollectionExtensions.AddFormsCryptoAzureKeyVault(IServiceCollection)EPiServer.Forms.Core.Events.IFormEventsRaiser(interface)EPiServer.Forms.Core.Events.FormSubmittingResult(record)EPiServer.Forms.Core.Serialization.ContentReferenceJsonConverter
Internal implementation changes (non-public or unsupported)
EPiServer.Forms.UI.Internal.XhtmlStringJsonConverterEPiServer.Forms.UI.Internal.FormsSmtpClient
Removed
EPiServer.AddOns.HelpersassemblyIEPiServerFormsCoreConfigandEPiServerFormsCoreConfigEPiServer.Forms.Configuration.*namespaceEPiServer.Forms.Transform.*namespaceEPiServer.Forms.EditView.IExcludeValidatorTypesIPostSubmissionActor.ActiveExternalFieldMappingTableIExternalFieldMappingService.GetAllExternalSystems()- Multiple obsolete
FormBusinessServicemethods DataSubmissionHelper.ValidateFormSubmittableStatus(four-parameter)FormsExtensionsUI.RenderWebFormViewToString,RenderFormElementsFormsExtensions.HasAnyExternalSystem(),GetContent(two-parameter),SplitBySeparatorIForm.DataandForm.Data(PropertyBag)InitializationModule.ConfigureContainer,Instance_DeletedContent,Instance_PublishedContentEPiServer.Forms.InitializationModuleclassSaveDataToStorageActor()parameterless constructorExternalSystemEditorDescriptors.GetSelectedFieldsName(FormIdentity, string)EPiServerFormsUIConfigclassSendEmailAfterSubmissionActor.GetFriendlySummaryText,GetPredefinedPlaceHolders
Modified
PropertyGenericList<T>.SaveData()— Now parameterless.FreeGeolocationProvider— No longer extendsGeolocationProviderBase.FormsEventsandCryptoEngineFactory—[ServiceConfiguration]removed.- All scheduled jobs —
[ScheduledPlugIn]changed to[ScheduledJob],publicchanged tointernal. SpecializedProperties—[PropertyDefinitionTypePlugIn]changed to[PropertyDefinitionType].FormContainerBlockController— Constructor injection.FormCryptoEngineBase— Constructor injection.SendEmailAfterSubmissionActor._smtpClient—ISmtpClientchanged toFormsSmtpClient.
Behavioral changes
- Serialization format –
PropertyGenericList<T>now usesSystem.Text.Jsonwith camelCase. Data stored withNewtonsoft.Jsonmay not deserialize correctly. - Assembly scanning –
AppDomain.CurrentDomain.GetAssemblies()replacesAssemblyScanner.GetScannableAssemblies(). Proxy classes are filtered out. - Geo provider registration – Now uses
AddSingleton(previouslyTryAddSingleton), overwriting any existing registration. - Email sending – MailKit (using the internal
FormsSmtpClient) replacesEPiServer.Notification.Internal.ISmtpClient(available in the CMS 12 package). - Default form element view – Now
visualbuilderviewinstead ofAllPropertiesView.
Updated 2 days ago