Content management and repository breaking changes
Breaking changes to content repositories, content areas, XhtmlString, content versioning, validation, and save actions in CMS 13.
This article covers content management breaking changes in CMS 13, including content repository, content areas, XhtmlString, content versioning, validation, and save actions.
EPiServer.IContentRepository
- A new
Copymethod was added. Change any previousCopyimplementations to the new method. - An additional method
Publishwas added. - An additional method
ConvertLanguageBranchwas added. - The entries in the Data dictionary for a thrown
ValidationExceptionare now anIList<ValidationError>when a property has multiple errors. Previously it was a single error. - The
MoveToWastebasketmethod now takes anAccessLevelparameter. ThedeletedByparameter was removed in favor of reading the current user fromIPrincipalAccessorsimilar to other methods on this interface.
EPiServer.IContentRepositoryExtension
Class was obsoleted because all its methods are now on the IContentRepository interface.
EPiServer.Core.ContentProvider
- The
deletedByparameter onMoveToWastebasketwas removed. The provider should read the current user fromIPrincipalAccessorsimilar to other methods. - Property
WastebasketReferencenow returns aContentReferenceinstead of aPageReference. - Protected method
CreateContentResolveResult(ContentCoreData contentData)changed toCreateContentResolveResult(ContentNode contentData). Custom providers overriding this method must update the parameter type fromContentCoreDatatoContentNode.
EPiServer.Core.ContentReference
- Properties
StartPage,RootPage, andWasteBasketchanged fromPageReferencetoContentReference. - The setter of the
StartPageproperty was obsoleted.
PageReference obsolescence
PageReference is obsolete throughout CMS 13. Replace all usages with ContentReference. The following types have had PageReference parameters or return types replaced with ContentReference:
EPiServer.Core.ConvertedPageEventArgs– PropertyPageLinkEPiServer.Core.IPageCriteriaQueryService– ParametersEPiServer.PropertyCriteriaCollection– ParametersEPiServer.Core.PageDataCollection– ParametersEPiServer.Core.PageTypeConverter– ParametersEPiServer.Core.PageData– PropertiesContentLink,ParentLink, andArchiveLinknow returnContentReferenceinstead ofPageReference.EPiServer.Personalization.VisitorGroups.Criteria.ViewedPagesModel– Return value forGetViewedPageLinkEPiServer.Personalization.VisitorGroups.CriterionEventArgsExtensions– Return value forGetPageLink
ContentArea changes
-
EPiServer.Core.ContentArea– Class no longer inheritsXhtmlString. All properties and methods related to string manipulation are obsoleted (ToHtmlString,ToInternalString, etc.).- Property
FilteredItemswas obsoleted. UseItemsto get all items. Or use HTML Helpers or Tag Helpers to render content areas. Alternatively, useIEnumerable<IContentAreaItemsRenderingFilter>to read all filters and apply to a list for rendering. - Property
Tagwas obsoleted since it is no longer being used.
- Property
-
EPiServer.Core.ContentAreaItem– Constructor no longer acceptsContentFragment. Empty instances of this class are no longer saved. At least one property must be assigned for the instance to be considered non-empty.RenderSettingschanged toIDictionary<string, string>, and the setter was replaced with an initializer. -
EPiServer.SpecializedProperties.PropertyContentArea– No longer inherits PropertyLongString and no longer supports raw strings. -
EPiServer.SpecializedProperties.PropertyContentAreaItem– No longer inherits PropertyLongString and no longer supports raw strings. -
EPiServer.Core.IContentAreaLoader– MethodGetwas removed in favor ofLoadContent. A new overloadedLoadContentmethod with aContextModeparameter was added. -
EPiServer.Core.ContentAreaItemExtensions– Extension methodGetContentonEPiServer.Core.ContentAreaItemwas removed in favor ofLoadContent.
XhtmlString changes
-
EPiServer.Core.XhtmlString– MethodToHtmlString(IPrincipal principal)was obsoleted with compilation error. Use HTML Helpers or Tag Helpers to render, or useIEnumerable<IStringFragmentRenderingFilter>to filter fragments for rendering. MethodToHtmlString()now always filters away content fragments and personalized fragments. -
EPiServer.Core.Html.StringParsing.StringFragmentCollection– MethodsGetFilteredFragments()andGetFilteredFragments(IPrincipal principal)were obsoleted with compilation error. UseIEnumerable<IStringFragmentRenderingFilter>to filter fragments for rendering instead. -
EPiServer.Core.Html.StringParsing.ContentFragment– ConstantIsInlineBlockAttributeNameis no longer used; useInlineBlockTypeIdAttributeNameto determine if the item is an inline block. InterfaceIRenderSettingsis no longer implemented. Class no longer implementsISecurableinterface. Now implementsIPersonalizedGroupinstead ofIContentGroup. Constructor parametersIPublishedStateAssessorandIContentAccessEvaluatorwere removed. -
EPiServer.Core.Html.StringParsing.PersonalizedContentFragment– No longer implementsISecurable,IContentGroup, andIPersonalizedRoles. Now implementsIPersonalizedGroup. Constructor parameter type changed fromISecuredFragmentMarkupGeneratortoIPersonalizedFragmentMarkupGenerator. -
EPiServer.Core.Html.StringParsing.IContentGroup– Interface removed. UseIPersonalizedGroupinstead. -
EPiServer.Core.Html.StringParsing.ISecuredFragmentMarkupGenerator– Interface removed. UseIPersonalizedFragmentMarkupGeneratorinstead. PropertyRoleSecurityDescriptorreplaced withRoleIdentitiesof typeIEnumerable<string>. -
EPiServer.Core.Html.StringParsing.ISecuredFragmentMarkupGeneratorFactory– Interface removed. UseIPersonalizedFragmentMarkupGeneratorFactoryinstead. -
EPiServer.Core.Html.StringParsing.VisitorGroupMarkupGenerator– Now implementsIPersonalizedFragmentMarkupGeneratorinstead ofISecuredFragmentMarkupGenerator. PropertyRoleSecurityDescriptorreplaced withRoleIdentities. Constructor overloads acceptingIRoleSecurityDescriptorremoved. Constructor parameterIVisitorGroupRoleRepositoryremoved. -
EPiServer.Core.Html.TextIndexer– Removed because it is no longer used.
ScriptParser changes
EPiServer.Core.Html.StringParsing.ScriptParserOptions–- Default value for property
LoadingModechanged toScriptParserMode.Remove, meaning illegal URIs, HTML elements, and HTML attributes are removed during content loading. - Default value for property
SavingModechanged toScriptParserMode.ThrowException, meaning saving content with illegal URIs, HTML elements, or HTML attributes causes anInvalidPropertyValueException. - New settings
MediaUploadModeandMediaExtensionsToParsespecify which extensions for media files should be parsed during upload, and which action should be taken for illegal elements/attributes. Default values are that extensions.svg,.svgz,.html, and.htmare parsed and that an exception is thrown for illegal attributes/elements. - The
AttributeNamesproperty was removed. UseElementAttributes, which allows you to define attributes for elements. By default,ElementAttributescovers attributes that start withon*for elements.
- Default value for property
Property changes
PropertyString and PropertyLongString
-
EPiServer.Core.PropertyString– PropertyStringchanged accessibility to public. PropertyPublicStringwas removed. -
EPiServer.Core.PropertyLongString– PropertyLongStringchanged accessibility to public. PropertyPublicLongStringwas removed. PropertyPageLinkwas removed in favor ofParent.OwnerLink.
PropertyUrl and related types
-
EPiServer.SpecializedProperties.PropertyUrl– PropertyLinkEditorTypewas removed. PropertyStringwas replaced withLongStringproperty. Base class changed fromPropertyStringtoPropertyLongStringto support longer URLs. -
EPiServer.SpecializedProperties.PropertyDocumentUrl– PropertyLinkEditorTypewas removed. -
EPiServer.SpecializedProperties.PropertyImageUrl– PropertyLinkEditorTypewas removed.
PropertyBlock and PropertyXhtmlString
-
EPiServer.SpecializedProperties.PropertyBlock<T>– No longer implementsIPersonalizedRolesinterface. MethodGetRoles()was removed. PropertyItemTypeReferencechanged type fromBlockTypeReferencetoContentTypeReference. -
EPiServer.SpecializedProperties.PropertyXhtmlString– No longer implementsIPersonalizedRolesinterface. MethodGetRoles()was removed. Constructor accepting(string value, IPrincipalAccessor principalAccessor)was removed. -
EPiServer.SpecializedProperties.IPropertyBlock– PropertyBlockPropertyDefinitionTypeIDwas replaced withBlockPropertyDefinitionID. PropertyItemTypeReferencechanged type fromBlockTypeReferencetoContentTypeReference.
LinkItem
EPiServer.SpecializedProperties.LinkItem– Overridesobject.Equalsandobject.GetHashCode. PropertyAttributeschanged type fromDictionary<string, string>toIDictionary<string, string>. TheAttributesdictionary is no longer case-sensitive. Type implementsIReadOnly.
Other property changes
-
EPiServer.Core.PropertyData– TheLocateproperty is obsolete and is no longer available for retrieving services. TheClearmethod is no longer virtual. To override clear behavior, override methodClearImplementationinstead. -
EPiServer.Core.PropertyDataCollection– PropertyLanguageBranchis obsolete and is no longer assigned. -
EPiServer.Core.PropertyCriteriaCollection– Type no longer inheritsSystem.Collections.CollectionBase, but instead implementsIList<PropertyCriteria>. -
EPiServer.Core.RawContent– Public fields were changed to public properties. -
EPiServer.Core.RawNameAndXml– Public fields were changed to public properties. -
EPiServer.Core.RawProperty– PropertyPageDefinitionIDwas removed in favor ofPropertyDefinitionID. Public fields were changed to public properties. PropertyBlockTypeReferencechanged type fromBlockTypeReferencetoContentTypeReference. -
EPiServer.Core.RequiredPropertyValueException– No longer used.System.ComponentModel.DataAnnotations.ValidationExceptionis thrown instead if a required property is missing. -
EPiServer.Web.PropertyControls.MultipleOptionsListSettings– Moved toEPiServer.SpecializedProperties.PropertySettingsnamespace in theEPiServerassembly.
Content versioning
-
EPiServer.Core.IContentVersionRepository– A new eventCommonDraftAssignedwas added. A new overloadedDeletemethod with anAccessLevelparameter was added. New overloadedLoadCommonDraftandLoadPublishedmethods with avariationKeyparameter were added. -
EPiServer.Core.IContentVersionRepository.List– No longer automatically counts and assigns the out parametertotalCount. To gettotalCountcounted, you must explicitly assignEPiServer.Core.VersionFilter.IncludeTotalCounttotrue. IfIncludeTotalCountis not assigned,totalCountis assigned the value-1. -
EPiServer.Core.IContentVersionRepositoryEx– Obsoleted. MethodListObsoletemoved toIContentVersionRepository. -
EPiServer.Core.IVersionable– A new propertyVariationwas added to support variations of content versions. -
EPiServer.Core.IContentCacheKeyCreator– A new methodCreateGuidCacheKeywas added to support GUID-based cache keys. -
EPiServer.Core.IStatusTransitionEvaluator– A new overloaded method was added that takes an optional parameter of existingContentVersion. -
EPiServer.Core.StatusTransition– This struct is nowreadonly.
Validation system overhaul
New validation skip options
-
EPiServer.DataAccess.SaveAction– Three new validation skip flags were added:SkipReferenceValidation– Skips reference validation during save.SkipApprovalValidation– Skips approval validation during save (requires Administer rights).SkipDataValidation– Skips data validation during save.SkipValidation– Composite flag combining all three skip options.- The
Patchaction now usesForceCurrentVersion | SkipValidationto update content without any validation.
-
EPiServer.DataAccess.SaveAction– ValueNonewas removed in favor ofDefault. ValueDelayedPublishwas removed in favor ofSchedule.
Content save validation
-
EPiServer.Validation.IContentSaveValidate<TContent>– A new interface propertySkipOptionof typeContentValidationSkipOptionwas added. Existing implementations must implement this property. UseContentValidatorBase<TContent>which provides default implementations. -
EPiServer.Validation.ContentValidationSkipOption– New enum defining which parts of content validation can be skipped:None,Data,Approval,References. -
EPiServer.Validation.IContentValidationService– New service interface providing content-specific validation with support for granular skip options. -
EPiServer.Validation.ContentSaveValidationContext– A new constructor argument with the content being validated was added. -
EPiServer.Framework.Validation.IContextValidationService– A new overload ofValidatewas added that accepts a predicate parameter to filter which validators should be called.
Behavioral changes
- Validators implementing
IValidate<T>(withoutIContentSaveValidateOptions) are now treated as supportingSkipDataValidationfor backward compatibility, meaning they are skipped whenSaveAction.SkipDataValidationis used. - References for content (from ContentReference, ContentArea, Url properties) are now validated for existence during save. Use
SaveAction.SkipReferenceValidationto suppress this validation. - CMS 13 enforces validation attributes (
RequiredForPublish,MinElements) on block creation from ContentArea, not just during publish. This may cause silent failures for custom validation attributes.
Content language and language settings
-
EPiServer.Core.LanguageLoaderOption– PropertyEvaluatePublishDateschanged default value totrue. This change makes content routing and content loading consistent. -
EPiServer.Core.LanguageSelectionSource– ValueMasterwas removed because it is no longer used. -
EPiServer.Core.LanguageSelector– The constructorLanguageSelector(string languageBranch, IContentLanguageSettingsHandler languageSettingsHandler)was removed in favor ofLanguageSelector(string languageBranch). -
EPiServer.Core.ContentLanguageSettingsHandler– The staticContentLanguageSettingsHandleris obsolete. Retrieve theIContentLanguageSettingsHandlerinstance from the service container. -
EPiServer.IContentEvents– Two new events were added,ConvertingContentLanguageandConvertedContentLanguage. -
EPiServer.Core.ContentOptions.AllowModifiedMasterLanguageProperties– When saving content in a non-master language, modifications to non-culture specific properties now throwInvalidOperationExceptionunless explicitly allowed through configuration.
Other content changes
-
EPiServer.Core.ContentMediaResolver– MethodInitializewas removed. The constructor parameter of typeIContentTypeBaseResolverwas removed. -
EPiServer.Core.EditTab– ValuesCategory,Link, andSchedulingwere removed because they are no longer used. -
EPiServer.Core.PageData– PropertyIsModifiedis only exposed explicitly through theEPiServer.Core.IModifiedTrackableinterface. PropertyACLand the constructor acceptingContentAccessControlListwere obsoleted. UseIContentAccessEvaluatorto check access rights, orGetContentSecurityDescriptor()to get the security descriptor. -
EPiServer.PageEventArgs– Removed as it was no longer in use. -
EPiServer.EPiServerCancelException– Constructor taking aPageEventArgsargument was removed. -
EPiServer.Construction.ConstructorParameterResolver– The staticInstanceproperty is obsolete. Retrieve the singleton instance from the service container. -
EPiServer.Construction.IPropertyDefinitionTypeResolver– MethodResolveTypehas an additional out parameter. -
EPiServer.Core.IBlockPropertyFactory– New overloads forCreateaccepting integer-based content type identifiers. -
EPiServer.Core.Transfer.IContentCopyHandler– Replaced the existingCopymethod with aCopymethod that has aCopyContentOptionsparameter. The oldCopy(ContentReference, ContentReference, AccessLevel, bool)overload was removed. -
EPiServer.Core.Transfer.ITransferPageData– Interface removed. UseITransferContentDatainstead. -
EPiServer.Core.Transfer.TransferPageData– Class removed. UseTransferContentDatainstead. -
EPiServer.Core.RawPage– Class removed. UseRawContentinstead for import/export. -
EPiServer.DataAbstraction.MetaDataProperties– ConstantPageFolderIDwas removed. Virtual Path Providers are no longer supported. -
EPiServer.Core.Transfer.IContentTransferContext– PropertyContentTypesMapchanged fromIDictionary<string, Guid>toDictionary<string, (Guid exportedGuid, Guid importedGuid)>. -
EPiServer.Core.Transfer.IFileTransfer– An additional parameterdisplayNamewas added to methodTryAddBlob. -
EPiServer.Core.Transfer.TransferImportOptions– PropertyContentLanguageswas removed in favor of propertySelectedLanguage. -
EPiServer.Cms.Shell.Service.Internal.ContentService– TheCopymethod no longer automatically publishes content. -
EPiServer.Cms.Shell.UI.Rest.Internal.ContentChangeManager– TheCopymethod no longer automatically publishes content.
Audiences (Visitor Groups)
Audiences (formerly Visitor Groups) are not enabled by default. Enable them by calling .AddVisitorGroupsMvc() and .AddVisitorGroupsUI() to register MVC and UI services. The EPiServer.Cms composition package no longer includes Visitor Groups as a dependency.
-
EPiServer.Personalization.VisitorGroups.DojoWidgetAttribute– Removed because Dojo is no longer supported for Audiences UI. UseCriterionPropertyEditorinstead. -
EPiServer.Personalization.IPersonalizedRoles– Interface removed. Functionality is now part ofIPersonalizedGroupinterface. -
EPiServer.Personalization.PageDataPersonalizationExtension– Class and its extension methodGetUsedPersonalizedGroupIdsremoved. -
EPiServer.Security.IRoleSecurityDescriptor– Interface removed. UseIEnumerable<string>for role identities instead. -
EPiServer.Personalization.IPersonalizedContentFactory– Method signatures changed;ISecuredFragmentMarkupGeneratorreplaced withIPersonalizedFragmentMarkupGenerator.
Updated 9 days ago
