Sites-to-applications and routing breaking changes
Breaking changes related to the SiteDefinition-to-Application migration, URL routing, UriSupport replacement, and URL segment changes in CMS 13.
This article covers SiteDefinition-to-Application migration, URL routing, and UriSupport replacement breaking changes in CMS 13.
Sites-to-applications migration
CMS 13 replaces the SiteDefinition model with a new Application model. The following types are obsoleted:
EPiServer.Web.SiteDefinition– Obsolete in favor ofApplication.EPiServer.Web.SiteDefinitionEventArgs– Obsolete in favor ofApplicationEvent.EPiServer.Web.SiteDefinitionUpdatedEventArgs– Obsolete in favor ofApplicationUpdatedEvent.EPiServer.Web.ISiteDefinitionRepository– Obsolete in favor ofIApplicationRepository. A temporary shim layer loads applications as site definitions during the transition.EPiServer.Web.ISiteDefinitionResolver– Obsolete in favor ofIApplicationResolver.EPiServer.DataAbstraction.ISiteConfigurationRepository– No longer used by CMS and obsoleted. No implementation is registered.
Host configuration changes
- Wildcard site host definition (
*) is replaced with a default application. TheApplication.IsDefaultproperty controls this behavior. - Database migration preserves existing sites, but the new application model requires explicit "Default" host configuration. You may need to configure this manually in Admin > Config > Manage Applications. See Application framework to understand available applications types.
Constructor and parameter changes
When upgrading code that depends on SiteDefinition or ISiteDefinitionResolver:
- Replace
ISiteDefinitionResolverwithIApplicationResolverin constructor injection. EPiServer.Cms.Shell.Search.ContentSearchProviderBase<TContentData, TContentType>– Changed constructor argument fromISiteDefinitionResolvertoIApplicationResolver.EPiServer.Web.Routing.EditUrlResolver– Methods acceptingSiteDefinitionas a parameter were obsoleted in favor of new overloads acceptingApplication.EPiServer.Web.SimpleAddressResolveContext– TheSiteIdproperty is obsolete in favor of the newApplicationNameproperty.
Routing context changes
EPiServer.Core.Routing.Pipeline.UrlResolverContext– TheHostDefinitionproperty is obsolete in favor of the newApplicationHostproperty.EPiServer.Core.Routing.Pipeline.UrlGeneratorContext– TheHostproperty is obsolete in favor ofApplicationHost. TheCurrentHostproperty is obsolete in favor ofCurrentApplicationHost.EPiServer.Web.Routing.ContentRouteData– New constructor parameterApplication. Constructor parameterHostDefinitionwas replaced withApplicationHost.EPiServer.Web.Routing.RoutingOptions– PropertyUsePrimaryHostForOutgoingUrlswas obsoleted. The system now always prefers primary hosts for URL generation (except in edit or preview mode with relative URLs). PropertyUseEditHostForOutgoingMediaUrlswas obsoleted. Configure application host with typeMediainstead.
UI URL segment change
The default UI URL segment has changed from /EPiServer to /Optimizely.
Module-specific URL segments have also been updated to remove EPiServer branding. The following module paths have changed:
| CMS 12 module path | CMS 13 module path |
|---|---|
/EPiServer/EPiServer.Cms.UI.Admin/ | /Optimizely/Settings/ |
/EPiServer/EPiServer.Cms.UI.Settings/ | /Optimizely/Profile/ |
/EPiServer/EPiServer.Cms.UI.VisitorGroups/ | /Optimizely/VisitorGroups/ |
/EPiServer/EPiServer.Cms.UI.ContentManager/ | /Optimizely/ContentManager/ |
/EPiServer/EPiServer.Cms.Forms.UI/ | /Optimizely/Forms/ |
/EPiServer/EPiServer.Cms.UI.Webhooks/ | /Optimizely/Webhooks/ |
/EPiServer/EPiServer.Cms.UI.Credentials/ | /Optimizely/Credentials/ |
/EPiServer/Optimizely.Graph.Cms/ | /Optimizely/GraphQL/ |
/EPiServer/Optimizely.Cms.OpalChat/ | /Optimizely/OpalChat/ |
/EPiServer/EPiServer.Cms.TinyMce/ | /Optimizely/TinyMce/ |
/EPiServer/EPiServer.Cms.UI.Extensibility/ | /Optimizely/Extensibility/ |
/EPiServer/EPiServer.Cms.DamIntegration.UI/ | /Optimizely/DamIntegration/ |
Update any bookmarks, integrations, scripts, or hard-coded references that rely on the previous /EPiServer/ URL format.
UriSupport replacement
The EPiServer.UriSupport class is obsolete. Resolve a singleton instance of IUriSupport from the DI container as a replacement. Members have been moved to dedicated classes:
| Removed members | Replacement |
|---|---|
HttpLocalhostUri, SiteDefinitionResolver, RemoveQueryStringDelimeter, Clear | Removed (no longer used) |
SiteUrl | EPiServer.Web.SiteDefinition.SiteUrl |
UIUrl, UtilUrl, ResolveUrlFromUIBySettings, ResolveUrlFromUIAsRelativeOrAbsolute, AbsoluteUrlFromUIBySettings, ResolveUrlFromUtilBySettings, AbsoluteUrlFromUtilBySettings | EPiServer.Web.UIPathResolver |
InternalUIUrl, InternalUtilUrl | EPiServer.Web.UIOption |
IsStringWellFormedUri, IsSchemeSpecified, Combine, BuildQueryString, AddQueryString, AddLanguageSelection, Split, SplitNoDelim, IsDataUri | EPiServer.Web.UriUtil |
AddValuesToCollection | System.Collections.Specialized.NameValueCollection |
EscapeUriSegments | EPiServer.UrlEncode |
EPiServer.Web routing changes
-
EPiServer.Web.HttpRequestSupport– MethodIsSystemDirectorywas removed in favor ofEPiServer.Web.UIPathResolver.IsSystemPath. -
EPiServer.Web.PermanentLinkUtility– MethodTryParseGuidwas removed in favor ofSystem.Guid.TryParse. -
EPiServer.Web.PropertyControls.FileSortOrder– ValuesDateLastAccessedandDateLastAccessedDescwere removed because they are no longer used. -
EPiServer.Web.Routing.AncestorReferencesLoader– ParametercontentEventswas removed in the constructor. -
EPiServer.Web.Routing.RoutingConstants– ConstantNodeKeywas removed because it is no longer used. -
EPiServer.Web.Routing.RoutingOptions– MethodConfigureForExternalTemplateswas removed in favor ofEPiServer.Web.Templating.TemplateOptions.ConfigureForExternalTemplates. -
EPiServer.Web.UIPathResolver– The parameterless constructor was removed. The staticInstancemethod was obsoleted. Inject or retrieve theUIPathResolversingleton instance from the service container.
IContentRouteEvents removal
EPiServer.Web.Routing.IContentRouteEvents– Interface removed. UseIContentUrlResolverEventsorIContentUrlGeneratorEventsinstead. The individual events map as follows:CreatingVirtualPath→IContentUrlGeneratorEvents.GeneratingUrlCreatedVirtualPath→IContentUrlGeneratorEvents.GeneratedUrlRoutingContent→IContentUrlResolverEvents.ResolvingUrlRoutedContent→IContentUrlResolverEvents.ResolvedUrl
EPiServer.Cms.AspNetCore routing
-
EPiServer.Core.Routing.Pipeline.UrlResolverContext– PropertyRemainingPathwas removed in favor of propertyRemainingSegments. -
EPiServer.Core.Routing.Pipeline.UrlResolverContextExtensions– Extension methodGetNextRemainingSegmentwas removed in favor of methodGetNextSegment. -
EPiServer.Cms.AspNetCore.Routing.ControllerActionEndpointSelectorPolicy– Behavioral breaking change: when no action name constraint exists in the route, the "Index" method is selected first (if available) instead of the first valid endpoint by method sorting. -
System.Web.IHttpHandler– This feature was removed.
CMS routing behavioral changes
-
When a page has two language versions, and one language version is configured to use the other as a fallback, if the primary language version expires, CMS 13 displays the fallback language instead of showing a 404.
-
EPiServer.Web.Routing.ContentRouter– TheInstancefield was changed to a property. -
EPiServer.Web.Routing.RoutedContentEvaluationResult– TheNotFoundandOKfields were changed to properties. -
EPiServer.Globalization.IUpdateCurrentLanguage– MethodsUpdateLanguageandUpdateReplacementLanguagewere removed in favor of methodSetRoutedContent. -
RouteArguments.MatchWildcardHost– Obsolete. UseMatchHostinstead.
Updated 1 day ago
