Episerver 11.1 prerelease

Testing Episerver prerelease 11.1.0 with Alloy

*UPDATE 2017-11-06* see comment from Per at the bottom.

*UPDATED* The side effect that I had continues to show up occasionally. Seems like it can be triggered with Clean and then Rebuild the project but it really depends on the position of moon and sun. I think I found the root cause from FilterTemplate that is used in filtering of menu items (ContentExtensions.FilterForDisplay). FilterTemplates template resolver is EPiServer.Web.Internal.DefaultTemplateResolver when things go south and EPiServer.Web.Internal.TemplateResolverImplementation when things work correctly. When things goes south the reason is that CustomizedRenderingInitialization is registered to the EPiServer.Web.Internal.TemplateResolverImplementation singletons events and naturally can’t get the events from FilterTemplate when it is using a new instance of template resolver each time. See at the bottom some logging.

Just a quick test of Episerver prerelease 11.1.0 with Alloy demo site (Episerver update 186). I wanted to see if there are any “major” braking changes with the Alloy demo site, so here goes my install steps.

  • Create new Episerver MVC Alloy site with Episerver search (not Episerver Find), target .net framework 4.7
  • Update project Episerver NuGet packages to the 11.1 prerelease (remember to check the ‘Include prerelease’ checkbox in VS NuGet package manager)
  • Optionally update the Newtonsoft.Json to version 10.0.3 (Episerver update 185 note concerning Episerver Find, prerelease doesn’t have packages for Episerver Find)
  • Build => fix errors
    • JumbotronBlock.cs, property ImageDescription, change the UIHint.LongString to UIHint.Textarea (as the obsolete warning says)
    • SitePageData.cs, property MetaDescription, change the UIHint.LongString to UIHint.Textarea (as the obsolete warning says)
    • TeaserBlock.cs, property Text, change the UIHint.LongString to UIHint.Textarea (as the obsolete warning says)
    • there are three errors about XForms, install the package: EPiServer.XForms (v=1.0.1-pre-000032, remember to check the ‘Include prerelease’ checkbox in VS NuGet package manager)
    • there are two errors about EPiServer.Search, install the package: EPiServer.Search.Cms (v=9.0.0-pre-000004, remember to check the ‘Include prerelease’ checkbox in VS NuGet package manager)
    • now it should build without errors and warnings
  • Open package manager console and run: Update-EPiDatabase
  • F5 to run the site

So no major braking changes so far. Waiting for new prereleases.

Side note: I did have one weird issue with top navigation. Depending where I had a breakpoint the FilterTemplate used in ContentExtensions.FilterForDisplay wasn’t filtering out the container pages. See the TemplateCoordinator.OnTemplateResolved(object sender, TemplateResolverEventArgs args) which should set the resolved template to null for pages implementing the IContainerPage but this event handler wasn’t executed and the top menu had the ‘How to buy’ and ‘Campaigns’ but without links (just the text). Couldn’t reproduce this reliably so I just created a new project and in that I wasn’t able to have this behavior at all.

*UPDATED* added this log entries to proof what goes wrong.

When things go south (see the template resolver type and hashcode in FilterForDisplay):

// registration in CustomizedRenderingInitialization
CustomizedRenderingInitialization, registering for templateresolver (type: EPiServer.Web.Internal.TemplateResolverImplementation, hashcode: 40517777).

// this is the ContentExtensions.FilterForDisplay
FilterForDisplay, templateFilter templateresolver type: EPiServer.Web.Internal.DefaultTemplateResolver, hashcode: 23615301

// this is the TemplateCoordinator.OnTemplateResolved, some events come here correctly
Set SelectedTemplate = null, templateresolver hashcode: 40517777, type: EPiServer.Web.Internal.TemplateResolverImplementation

When things go correctly (see the template resolver type and hashcode in FilterForDisplay):

CustomizedRenderingInitialization, registering for templateresolver (type: EPiServer.Web.Internal.TemplateResolverImplementation, hashcode: 62773796).

FilterForDisplay, templateFilter templateresolver type: EPiServer.Web.Internal.TemplateResolverImplementation, hashcode: 62773796

Set SelectedTemplate = null, templateresolver hashcode: 62773796, type: EPiServer.Web.Internal.TemplateResolverImplementation

2 thoughts on “Testing Episerver prerelease 11.1.0 with Alloy

  1. Thanks Per for answering here too. Good that you were already aware of this issue and even better that you have already fixed it in your internal builds.

    This is how Episerver does things 🙂 Other companies should definitely takes notes from Episerver how they do their continuous development and how well they react to partner feedback.

Leave a comment