Upgrade Episerver Relate to CMS 11
This topic describes how to upgrade Episerver Relate to Optimizely Content Management System (CMS 11).
Prerequisite: If you do not have one, set up a Relate 7.5 website. See Relate+ 7.5 documentation.
- Use Visual Studio to open the website.
- Press Ctrl+Shift+S to save the solution.
- Change the Target Framework to 4.6.1.
- Install the following Optimizely NuGet feed packages:
- Remove solution references to
EPiServer.BaseLibrary.dllandEPiServer.Implementation.dll. - From the
binfolder, deleteEPiServer.BaseLibrary.dll,EPiServer.Implementation.dll, andEPiServer.WorkflowFoundation.dll. - Fix the following obsolete or missing API functions:
- Error CS0115
PropertyClubAssociation.CreatePropertyControl(): no suitable method found to override EPiServer.Templates.RelatePlus - Error CS0115
PropertyForumAssociation.CreatePropertyControl(): no suitable method found to overrideEPiServer.Templates.RelatePlus - Remove
CreatePropertyControl ()functions and replaceRelateInitializationModule.cswith the attached file. - Replace the following methods and properties:
- Error CS0115
| Old | New |
| Common.EPiServerCommonEventArgs | EPiServer.Common.EPiServerCommonEventArg |
| Common.Uri.UriProvider | EPiServer.Common.Uri.UriProvide |
| Common.EntityStatus.Approved | EPiServer.Common.EntityStatus.Approved |
| Common.Security.IUser | EPiServer.Common.Security.IUser |
| Common.Settings | EPiServer.Common.Settings |
| Common.Sorting | EPiServer.Common.Sorting |
| Common.Visits | EPiServer.Common.Visits |
| AccessControlList: Exists | AccessControlList:Contains |
change
* Fix the compile error in `Templates\__RelatePlus\InitializationModules\CmsIntegrationModule.cs` by replacing it with the [attached file](/epiui/CMS/Content/contentassets/7ce4a81509d842879d33e0fa2dc57bc6/cmsintegrationmodule.cs,,189220?epieditmode=False "CmsIntegrationModule.cs").
* In `RouteTable.Routes.GetVirtualPathForNonContent`, change
var currentLanguage = Globalization.ContentLanguage.PreferredCulture.Name;
to
var virtualPath = UrlResolver.Current.GetVirtualPathForNonContent(entry, currentLanguage, null);
-
In
Configuration.Settings.Instance.SiteDisplayName, updateEPiServer.Web.SiteDefinition.Current.Name. -
In
StripHtmlFilterRules, update usingEPiServer.HtmlParsing.Internal;. -
In
EPiServer.Web.PermanentLinkMapStore.TryToMapped, updateWeb.Routing.UrlResolver.Current.TryToPermanent(responseItem.Uri.ToString(), out mappedUrl). -
Change
PermanentContentLinkMap pplm = PermanentLinkMapStore.Find(pageEntity.PageGuid) as PermanentContentLinkMap;to
PermanentLinkMap pplm = ServiceLocator.Current.GetInstance<IPermanentLinkMapper>().Find(pageEntity.PageGuid); -
Regarding the function
VersioningFileSystemSearchHandler:temporarily ignore it. To do so, comment it and return zero (0).
-
In the
EPiServerFramework.configfile, run Update-epidatabase or add an updateDatabaseSchema="true" attribute to the episerver.framework tag. -
Press Ctrl+F5 to browse the website.
-
Convert the database to UTC by opening Package Manager Console and running the cmdlet Convert-EPiDatabaseToUtc.
-
Open
RelatePlus.Master.Designer.cs. Within that file, changeprotected global::System.Web.UI.HtmlControls.HtmlGenericControl HtmlElement;toprotected global::System.Web.UI.HtmlControls.HtmlElement HtmlElement;. -
Open
ClubMasterPage.Master.Designer.cs. Within that file, changeprotected global::System.Web.UI.HtmlControls.HtmlGenericControl HtmlElement;toprotected global::System.Web.UI.HtmlControls.HtmlElement HtmlElement;. -
Open
SearchRelatePlus.Master.Designer.cs. Within that file, changeprotected global::System.Web.UI.HtmlControls.HtmlGenericControl HtmlElement;toprotected global::System.Web.UI.HtmlControls.HtmlElement HtmlElement;. -
Rebuild the project.
-
Copy the IMAP4.Net.dll and Parse.Net.dll (attached files) to the
/binfolder. -
Press Ctrl+F5 to browse the website.
-
If you want to send email in a Relate+ site, open the file
EPiServerMail\MasterPages\Mail.Master, and replace
<%= Page.DojoConfig(false, true) %>
with
<%= Page.ConfigureDojo(false, true, false) %>Updated 8 days ago