Breaking changes in CMS 11
Describes breaking changes for Optimizely Content Management System (CMS 11) in relation to previous version 10, and the steps needed to update affected code.
To view the complete list of changes, see the release notes feed.
Some changes are binary breaking but do not necessarily require code changes but rather a project recompilation. Breaking changes are changes in method signatures or behavior of methods compared to the documented API in the previous version, described in this document.
New NuGet packages
In Optimizely Content Management System (CMS 11), some functionality, such as TinyMCE, was moved to separate NuGet packages. These packages have their version number and may or may not be upgraded with the core CMS packages.
XForms has also been moved to its own NuGet package. This means that the Forms viewer gadget, which was deprecated in CMS 10, is now also removed.
Most upgrades do not require code changes but require a re-compilation. You should have the correct packages installed. A missing package causes compilation errors after upgrading a site. See New NuGet packages for which packages you must manually add.
Separate NuGet packages for ASP.NET dependencies (CMS-8106)
- The integration with ASP.NET has moved to separate packages
EPiServer.Framework.AspNetandEPiServer.Cms.AspNet. EPiServer.MirroringService.MirroringMonitoring.MirroringMonitoringModulehas moved fromEPiServer.EnterprisetoEPiServer.Cms.AspNet. It must be manually changed inweb.configfor the mirroring module.- Usage of StructureMap as IOC container was moved to a separate package,
EPiServer.ServiceLocation.StructureMap. - .NET Framework 4.61 is required.
- MVC 5.2.3 is required.
CreatePropertyControlwas removed fromPropertyData. UseIPropertyControlFactoryinstead to register and create controls forPropertyDatatypes.- Providers (for example
ContentProvider,BlobProvider) no longer inheritProviderBase. If a provider that supports configuration throughweb.confighas an initialization method with the signature voidInitialize(string name, NameValueCollection config), it will be called during the initialization phase IServiceLocatorno longer supports named instances. The specific implementation inEPiServer.ServiceLocation.StructureMapsupports named instances.- Some methods in
IServiceLocatorwere removed from the interface and are now extension methods inEPiServer.ServiceLocationnamespace. EPiServer.Search.SearchSettings.Configwas replaced byEPiServer.Search.SearchSettings.Options.- It is no longer supported to get an
ILoggerinstance from IOC container. - Calls to logger that occur before
IConfigurableModulesare created, are not guaranteed to be persisted. - The setting for logger factories
episerver:LoggerFactoryTypemust now always be qualified with assembly name, even for built-in logger factories. - The method
IStringFragment.GetControlwas removed. UseIStringFragmentControlResolverinstead to create controls for string fragments. - Configuration sections
EPiServerFrameworkSection,StaticFileSection,EPiServerDataStoreSectionandSearchSectionwere moved to assemblyEPiServer.Framework.AspNet. - Property
DatabaseonDataAccessBasewas removed and is replaced by the propertyExecutor. PageData.LinkUrlno longer contains the query parameterepslanguage.ContentProviderscan no longer useCacheSettings.Filenames(previously obsoleted) to set up dependencies to files.EPiServer.Web.InitializationModulewas moved toEPiServer.Cms.AspNetassembly and can be used as a dependency module for other modules that want to run after Optimizely CMS is initialized when running as an ASP.NET application. There is a new moduleEPiServer.Initialization.CmsCoreInitializationin assemblyEPiServer. It can be a dependency module for modules that want to run after CMS Runtime is initialized when running CMS outside ASP.NET context.- Previously obsoleted methods Rebase/MakeRelative on type
EPiServer.Web.UrlBuilderin assemblyEPiServerwere moved to extensions method defined in assemblyEPiServer.Cms.AspNet. TypeUrlBuilder.RebaseKindis also moved toEPiServer.Web.RebaseKindinEPiServer.Cms.AspNetassembly. AccessControlList.Savewas deprecated and is no longer supported. UseIContentSecurityRepositoryinstead.
Manually and automatically registered templates share the same behavior (CMS-4161)
- Templates registered manually using
ITemplateRepository.AddTemplatesare now associated with the model type for which they are added, rather than the model type indicated through anyIRenderTemplateinterface of the template. This may affect the template selection during runtime, as the model type association is used to decide which template to use when rendering a content item. This change does not affect automatically registered templates, as they are already registered using the type specified by the IRenderTemplate interface. - The default implementation of
ITemplateRepository.AddTemplatesnow checks if a template exists before adding it. If the template is already registered, it does not add another one. - The default implementation of
ITemplateRepository.AddTemplatesnow makes sure that all template models are read-only before adding them to the repository.
PropertList<T> (CMS-7212)
PropertList<T> (CMS-7212)EPiServer.Core.Transfer.IRawContentRetrieverno longer populates the value of eachRawProperty. Instead, this is done by calling theIPropertyExporter.ExportPropertiesmethod.EPiServer.Core.Transfer.IPropertyImporterhas changed slightly to match the newIPropertyExporterinterface.PropertyData.ToRawString()is no longer called when exporting data. If a CustomPropertyDatatype had previously overridden theToRawValuemethod, it must now move that functionality to a class that implementsIPropertyExportTransformand register it with the Container.- PropertyJson-based properties, such as
PropertyList<T>, no longer rely onIObjectSerializerand container-registeredJsonConvertersfor their serialization. They now useNewtonsoft.Json.JsonConvertdirectly. This means thatJsonConvertersmust be defined as attributes on the classes and properties to which they apply.
Explicit IVersionable implementation on PageData is removed (CMS-7700)
PageDatano longer exposes a separate explicit implementation ofIVersionable.StartPublishandIVersionable.StopPublish.
Performance improved when loading large amounts of uncached content (CMS-7735)
CreateWritableCloneis used to create content instances when loading from the database.
Target .NET Standard 2 in CMS.Core and Framework (CMS-8133)
ThumbnailManagerwas moved toEPiServer.Cms.AspNet.Castle.Coredependency was changed to[4.2.1, 5.0).Castle.Windsordependency was changed from[4.1.0, 5.0).
Scheduled jobs have a shorter default content cache expiration (CMS-8653)
- Content loaded from a database and added to cache by scheduled jobs has a shorter cache expiration (default 1 minute).
Memory usage optimization: Data class PropertyData does not expose services (CMS-8659)
- SettingsID is obsoleted. Use extension method
GetSettingsIDor serviceIPropertyDataSettingsHelperinstead. SettingsContaineris obsoleted. Use the extension methodGetSettingsContaineror serviceIPropertyDataSettingsHelperinstead.TranslateDisplayName()orTranslateDescription()was moved toextensionmethod.
Other changes
CMS Core
- CMS-7749 The Provider property is no longer supported, as it is impossible to expose a fully thread-safe IList implementation.
- CMS-7791 Simple address is now the last registered router.
- CMS-6988 MoveContentEventArgs.ContentLink is updated when content is moved between providers.
- CMS-9129 Unsupported HostType's Service, Installer, and VisualStudio were obsoleted.
CMS UI
- CMS-1130 The
UIHint.BlockFolderandUIHint.MediaFolderwere obsoleted and are replaced by UIHint.AssetsFolder. - CMS-1252 Error message now displayed when updating partially rendered content.
- CMS-6217 Content repository descriptor keys are now not case-sensitive.
- CMS-6815
IContentChangeManager.Move(IContent source, IContent destination, bool createAsLocalAsset)now returns theContentReferenceof the moved content instead of void. This adds support for the scenario where content is assigned a newContentLinkvalue when it is moved between different content providers. - CMS-8229
ApplicationUIUserManager<TUser>.ResetPassword(IUIUser user)now throws a not supported exception. This is because ASP.NET Identity does not support generating new passwords for security reasons. Use the new methodResetPassword(IUIUser user, string newPassword)instead. - CMS-8802 The deprecated
datetime.jsmethodsserialize()anddeserialize()were removed. - CMS-8816 The deprecated slash method was removed from
epi/string. - CMS-8817
epi-cms/widget/HierarchicalListwas replaced byepi-cms/asset/HierarchicalList. - CMS-8830 The deprecated property
SiteDefinitionResolveronContentSearchProviderBasewas removed. UseSiteResolverinstead. - CMS-8832 The deprecated
EPiServer.Shell.Web.Mvc.Html.DojoExtensionswas removed, use.ConfigureDojoinstead. DateTimeproperties on the visitor group criterion model are serialized to ISO 8601 when being sent to the client.- The
MissingConfigurationExceptionnow inherits directly fromException. - The
UIHint.LongStringwas obsoleted and should be replaced withUIHint.Textarea. - Properties that use
LegacyPropertyEditorDescriptorshould be explicitly annotated withUIHint.Legacy. - Obsoleted constructors are removed where there are public constructors available that can be used instead.
- Obsoleted properties were removed from
PropertyUpdateResult,ComponentContainer,ContentSearchProviderBase, andCmsModuleViewModel. - Obsoleted classes
ZipFileVirtualPathProviderandSecurityEntityUtilitywere removed. - Obsoleted methods were removed from
UIDescriptorRegistry. _GrigWidgetBasenow emitsselectionChangedwhen deselecting row. Previously, it was triggered only when a row was selected.- The obsoleted delegate
DependencyGetterwas removed. - The obsoleted methods
watchModelChangeandunwatchModelChangeinepi/shell/_Commandwas changed from public to internal. - The class
ContentReferenceStorethat was available byepi.cms.contentreferenceskey is now obsoleted.
Manual changes required to legacy feature Mirroring
An updated DLL is available in the EPiServer.CMS.Core NuGet package (packages/EPiServer.CMS.AspNet.11.1.0/tools/MirroringService/), which you must manually patch when upgrading.
- Change
EPiServer.MirroringService.MirroringTransferProtocol.WCF.MirroringTransferClient,EPiServer.EnterprisetoEPiServer.MirroringService.MirroringTransferProtocol.WCF.MirroringTransferClient,EPiServer.Cms.AspNet - Change the type
EPiServer.Security.WindowsMembershipProvider,EPiServertoEPiServer.Security.WindowsMembershipProvider, EPiServer.Cms.AspNetinweb.config.
Updated about 2 months ago