Creating Microsites In Sitecore without SXA

dynamic-sites-globe2

I’ve not used SXA in anger but have heard good things about it. Unfortunately due to licencing and timeframes it was not an option for me on a recent project where I was required to recommend and deliver an mechanism for quickly creating Microsites in Sitecore.

TLDR: If SXA is not an option then Dynamic Sites Manager might be a good alternative for you.

This meant I had 3 options:

1) Manual Configuration in the Sitecore Config
2) Use a Sitecore Microsite Module (such as the Multiple Sites Manager)
3) Write something custom to support adding Microsites dynamically

Manual Config wasn’t really an option as I knew that we had a number of Microsites to add and having a more flexible approach with less work and maintenance involved was important. I also didn’t want to write something custom as I knew this would be a time-sink involving solving problems other people have already had to with one of the Sitecore Modules available.

Dynamic Sites Manager To The Rescue

After a fair amount of research and experimentation I decided upon an lesser known Module called Dynamic Sites Manager built by Pete Navarra. As we are using Sitecore 8.2 I decided to use this specific version (1.9.1) from Github.
This happens to be the most recent release of the Module. It does work with Sitecore 9.0 too.

Pete has written one or two posts on the Dynamic Sites Manager but during the setup and of the module and configuration of the various sites I learned some useful tips I thought I’d share. On the project I’m currently working on we have two Sites that are live using the Dynamic Sites Module so far and both are functioning well.
Pete was also really helpful on Slack fielding all my questions so I wanted to return the favour and blog about it.

Reasons I chose Dynamic Sites Manager

  • It’s been written for performance, it uses the Site Provider Pattern and doesn’t just hook into the HttpBeginRequest pipeline (like the Multiple Sites Manager does) – this can cause caching issues
  • Microsites an be added and (most) configuration implemented purely within Sitecore
  • Each Microsite has a number of settings that mimic native Sitecore config for a Site
  • Content for the Microsites can be created wherever you wish
  • Roles can be configured for Microsite content as normal in Sitecore
  • Existing Layouts, Components and functionality already created in Sitecore can be used in Microsites
  • The module works with Sitecore 8.2, has been around for a few years and has had 8 releases so is quite mature.
  • I tested the module with Sitecore 9.0 today and it works so when we upgrade to 9.x It should continue to work correctly.
  • The code is open source on Github so we can fork it and change anything if we need to
  • It has been battle-tested on large sites with 100s of Microsites

Installing the Module

The first step is to download and install the Module. You can download it from the Market Place. The direct link for 1.9.1 is here.

Install the module using the package installation wizard as normal.

dynamic-sites-1.9-install-2

Once the module installation has completed open the DynamicSites.config.example config file  here: /App_Config/Includes/X.SharedSourceModules and rename  to DynamicSites.config.

dynamic-sites-1.9-install-3

 

 

 

 

 

This will enable the module and configure the default settings for the module, as defined at the top of the file this config file adds:

1) Event Handlers to Update Custom Chosen Templates with Dynamic Sites Base Template
2) Site Providers for both Dynamic Sites as well as a Switcher Provider.
3) Dyanamic Site Default Settings. All Dynamic Sites will inherit from these default properties.
4) 4 Sitecore Settings.

I’d recommend leaving this as it is for now and coming back to tweak settings if you need to.

Module Configuration

The next steps are to configure the module settings within Sitecore and create your first Dynamic Site.

You can set some general settings if you wish for the module here: /sitecore/System/Modules/Dynamic Sites/Dynamic Site Settings. You will probably find you can just leave most of the default settings here ‘as is’.

One thing you may want to consider doing is updating the Site Definition Template. The dropdown highlighted below allows you to set a custom template as the Site Definition template. This adds a Dynamic Site Definition Base template to the item and allows site configuration to occur on the item level:

dynamic-sites-1.9-install-4

This will likely be if you wish to customise the configuration settings in future.

For now you can just continue with using the Site Definition Template that ships out of the box with the Module.

Creating A Dynamic Site

For this example I’m going to do this on my local machine but if this was on another environment the process would be very similar. I have a site called ‘Demo Site 1’ which I’ll use for this example:

dynamic-sites-1.9-install-6

  1. Go to: /sitecore/system/Modules/Dynamic Sites/Sites
  2. Right click on the folder to Insert a new Dynamic Site Definition (I called mine ‘Demo Site 1’)
  3. Configure the Key Settings for your Site such as:
    – Hostname – the url which will be used for your Site
    Home Item – the Home item of your site (In my case: /sitecore/content/Demo Site 1)
    Port – this will be (I hope!) 443 for Live but locally you may be using Port 80 perhaps. If you using a self signed cert locally you can use 443 locally too.
    Database – this will likely be web for local testing (depending on if you want to view the published or un-published content)dynamic-sites-1.9-install-7

    Dynamic Site Custom Properties – you can over-ride any settings you wish that are usually on the <site> node in the Sitecore config here or you can add any custom properties you need to support. For example I had a custom cdn url property that I added which you can see below.dynamic-sites-1.9-install-8
  4. Add your binding in IIS to your Sitecore site, this is my local Sitecore 8.2 u7 instance:
    dynamic-sites-1.9-install-9
  5. Add a host file entry to the Site (on another environment this would obviously be handled with a DNS).
  6. Ensure your Website Homepage is in it’s final workflow step and Published. If all is well you should then see the webpage if you visit it in your browser (e.g: http://demosite1.local)

dynamic-sites-1.9-install-5

Supporting Preview / Published Sites

Our content editors wanted to be able to preview their content on the CM (Master) before publishing to CD (Web). I wasn’t sure on how best to handle this scenario so I reached out to Pete on Slack and he was really Helpful.

It turns out the best way to set this up is to create two Site Definition items, one for CM and one for CD. Both sites should have the Home Item set as the same (most other settings will be the same also).

The CM Site Definition item needs to be at the top of the list (above the CD Site Definition item – so it resolves first on the CM) and be set as un-publishable. Note I’ve pre-fixed my Site Definitions with CM and CD to easily identify them:

dynamic-sites-1.9-install-11

 

You then need to configure a different hostname for the CM Site (e.g: master.demosite1.local). If all is well you should be able to view the master site and see differences in the Master content:

dynamic-sites-1.9-install-12

Other Considerations

WFFM

One of the stumbling blocks I came across is that when configuring the default Web Forms For Marketeers form folder I got an error as it couldn’t find an ID. The issue was that I was including the brackets within the config in the Site Definition. Therefore ensure you remove the brackets like so:

dynamic-wffm

Unicorn

If you use Unicorn to sync your Sitecore items across environments. You may wish to sync your Dynamic sites and content via Uncorn. I settled on 2 different configurations to handle this.

A new items only configuration to deploy the Main Site Home Item only one like so (this is redacted):

<configuration name="Dynamic Sites New Items Only" description="Unicorn Config for new Dynamic sites items only (Existing items, deleted items or changed items are ignored)">
 <evaluator type="Unicorn.Evaluators.NewItemOnlyEvaluator, Unicorn" singleInstance="true"/>
 <dataProviderConfiguration enableTransparentSync="false" />
 <predicate>
 <include name="DynamicSitesNewItemsOnlyDemoSite1" database="master" path="/sitecore/content/Demo Site 1/Home">
 <exclude children="true"/>
 </include>
 </predicate>
 <dataProviderConfiguration enableTransparentSync="false" />
 <syncConfiguration updateLinkDatabase="true" updateSearchIndex="true" />
</configuration>

A main configuration to deploy component content folders and setting items to the site likes so (this is redacted):

<configuration name="DynamicSites" description="Unicorn Config for DynamicSites Items">
<predicate>
 <exclude path="/sitecore/content/Demo Site 1/Home" />
 <exclude childrenOfPath="/sitecore/content/Demo Site 1">
 <except name="Forms" includeChildren="false"/>
 <except name="Components" includeChildren="false"/>
 </exclude>
 <exclude childrenOfPath="/sitecore/content/Demo Site 1/Components/Banners" />
 <exclude childrenOfPath="/sitecore/content/Demo Site 1/Components/Promos" />
 <include name="DynamicSitesMediaFolders" database="master" path="/sitecore/media library/DynamicSites" includeChildren="true">
 <exclude childrenOfPath="/sitecore/media library/DynamicSites/Demo Site 1/Images"/>
 <exclude childrenOfPath="/sitecore/media library/DynamicSites/Demo Site 1/Files"/>
 </include>
</predicate>
<!--exclude the dynamic sites fields that will be different for each environment-->
<fieldFilter type="Rainbow.Filtering.ConfigurationFieldFilter, Rainbow">
 <exclude fieldID="{2E6EA147-39B4-48B9-B729-89DB73646518}" note="'Hostname'" key="Hostname" />
 <exclude fieldID="{671F0A96-8270-49C6-B25C-17A4A4EE5730}" note="'Port'" key="Port" />
 <exclude fieldID="{A9B6C54F-88CB-4A9F-9250-6B2B1D26B79C}" note="'Properties'" key="Properties" />
 <exclude fieldID="{E6869EFC-46EB-458E-9990-3DBF914E6F85}" note="'Database'" key="Database" />
</fieldFilter>
<dataProviderConfiguration enableTransparentSync="false" />
<syncConfiguration updateLinkDatabase="true" updateSearchIndex="true" />
</configuration>

Note the use fieldFilter usage here to exclude deployment of the environment specific fields such as the Hostname.

Caching

The caching for the Dynamic Sites module has been implemented using a custom Sitecore cache and therefore shows up in the Sitecore Cache.aspx page viewer. If you want to explore what is in the cache to debug any issues with Caching then you might want to use an tool to do so. I used this Cache Viewer SPE Module and it worked really well for seeing the cache for each Site. The cache key used is DynamicSites.SiteCache.

dynamic-cacheviewer

You should find that if you clear the cache then any settings you update should update and be reflected.

Default Context Database Issue

We had some issues serving some Dynamic Sites from the CD Server. The error we were seeing was:

ERROR An error while Initializing occurred
Exception: System.InvalidOperationException
Message: Could not find configuration node: databases/database[@id='master']
Source: Sitecore.Kernel
 at Sitecore.Configuration.DefaultFactory.GetConfigNode(String xpath, Boolean assert)
 at Sitecore.Configuration.DefaultFactory.CreateObject(String configPath, String[] parameters, Boolean assert)
 at Sitecore.Configuration.DefaultFactory.GetDatabase(String name, Boolean assert)
 at Sitecore.Configuration.DefaultFactory.GetDatabase(String name)
 at Sitecore.SharedSource.DynamicSites.Utilities.DynamicSiteSettings.get_GetCurrentDatabase()
 at Sitecore.SharedSource.DynamicSites.Utilities.DynamicSiteSettings.get_GetSettingsItem()
 at Sitecore.SharedSource.DynamicSites.Utilities.DynamicSiteSettings.get_SitesFolder()
 at Sitecore.SharedSource.DynamicSites.Utilities.DynamicSiteManager.GetDynamicSitesDictionary(Site defaultSite)
 at Sitecore.SharedSource.DynamicSites.Sites.DynamicSitesProvider.InitializeSites()
 at Sitecore.SharedSource.DynamicSites.Sites.DynamicSitesProvider.GetSites()

After some further digging into the DynamicSiteSettings class It turned out that for some reason the module was not finding the context database and so was falling back to Master in this block of code:

public static Database GetCurrentDatabase
 {
 get
 {
 return Context.ContentDatabase ?? Context.Database ?? Database.GetDatabase("master");
 }
 }

Our CD servers do not have access to the Master database so thats why the error only occurred on CD. To resolve this I branched the module and added a setting for the database fall-back instead of a hard coded ‘master’ value. This is set like so in the config:

<!-- Dynamic Sites - Fallback Current Database
 The database to fallback to when getting the current database 
 if Context.ContentDatabase & Context.Database are null
 -->
 <setting name="DynamicSites.FallbackCurrentDatabase" value="master" />

On our CD servers we set this to Pub where our published live content exists and this resolved the issue. This issue doesn’t seem to occur on an out of the box install of 8.2 u7 or 9.0 so It may be a nuance of our specific setup but if you come across if feel free to use my patched version.

Conclusion

We’ve only launched two Sites using the Dynamic Sites Manager Module so far but it’s working really well. Obviously you don’t get a bunch of pre-built components and some of the other Bells and Whistles you get with SXA but if you need  flexible, simple, well implemented, and full-featured Microsite/Dynamic Site solution which allows you to use your existing page templates and components then I can highly recommend it.

Thanks again to Pete for his hard work on this and his assistance. I’ll try not to ask him any more questions…

The Business Case & Considerations for a Sitecore 9.2 Upgrade

smoke-2551073_1920
I don’t often write Sitecore blog posts from a business perspective but I today I thought I would as I think some Sitecore customers are still on 8.x or 9.0 and are considering an upgrade to Sitecore 9.2.

With Sitecore 9.3 likely to be released later this year and mainstream support for 8.2 and below running out in December now is a good time to consider upgrading.

In this post I’m going to outline what the benefits of moving to 9.2 are and also the considerations you should make before embarking on an upgrade.

What are Benefits / Features of Sitecore 9.2?

This is usually one of the first questions that will be asked. I’m not going to keep this fairly high-level as there are many in-depth blog posts out there on Sitecore 9.1 & 9.2 features but the following should provide a succinct summary.

Sitecore 9.1 & 9.2 bring a lot of new features and there has been a big focus on splitting features and functionality out from the previous large monolithic architecture to a smaller modern micro-service based architecture:

  • Sitecore Cortex – Sitecore’s new Machine Learning Brain which can Suggested Personalisation and process and leverage customer data
  • Sitecore Identity – Single Sign On and Federated Authentication (using IdentityServer)
  • Sitecore Universal Tracker – Provides an central Analytics API to track  interactions from any device (e.g mobile apps, IoT, AR and VR)
  • Sitecore JavaScript Services (JSS) – allows development of apps using front-end frameworks such as Angular, React and Vue, using Sitecore as the source for the data (including SXA & Sitecore Forms support in 9.2).
  • Sitecore Accelerator Framework (SXA) Accessibility Improvements – SXA has been around for a couple of years and is a package or pre-built components for Sitecore allowing you to get sites up and running quicker.
  • Sitecore Host – A lean common runtime for .NET Core applications (Powers: Horizon, Universal Tracker, Sitecore Identity)
  • Helix Configuration – 9.1 shipped with some Helix configuration already setup. Helix is Sitecore’s recommended approach to building Sitecore Sites it sets out an number of overall design principles and conventions to follow.
  • Sitecore Installer Assistant (SIA) – 9.2 provides a new GUI for easily installing Sitecore in a few clicks
  • SSL offloading – 9.2 provides an SSL offloading config to Improve security and performance by shifting SSL Processing onto separate processors
  • Active Personalization Dashboard – 9.2 has a new new dashboard which provides an overview of all personalization actively occurring, providing visibility of poorly/well performing tactics to act upon.
  • Many other improvements including: Search, Content Delivery, xDB and Analytics, Sitecore Forms, EXM, SIF(2), YAML Item Serialization, Bug Fixes and performance Improvements

But We’re on Sitecore 8.2 or below, what else do I get?

Mainstream Support

If you are yet to upgrade to Sitecore 9 then you need to consider this soon as Mainstream support for 8.2 and below expires in December 2019. https://kb.sitecore.net/articles/641167
This means that whilst Sitecore will still provide security updates and fixes and endeavour to assist with product incidents they may not provide support for the following:

  • Assistance with errors or unexpected behaviour during installation or development
  • Addressing product defects as hot-fixes or patches
  • Compatibility fixes for supported technology platforms.

Therefore if you are on 8.2 or below after December this year then you may need to upgrade to resolve certain issues (depending on what the issues are).

Sitecore 9.0 Features

If you are on 8.2 or below you will also benefit from all the features released in 9.0, here are the key ones:

  • xConnect – Provides an unified API that centralises data access
  • Headless CMS support and JSS – Allows web apps to be built with React, Angular, Vue using Sitecore data
  • Rules based configuration – Configuration is now much simpler as it can be set based on the server role (e.g Content Delivery, Content Authoring)
  • Sitecore Install Framework (SIF) – SIF is a framework for installing Sitecore using automated scripts. This is how Sitecore 9 and above is now installed and it means deployments can be automated easier.
  • Sitecore Accelerator Framework (SXA) – SXA is a pre-built set of components to allow pages to be developed quicker with less development effort
  • Sitecore Forms – Sitecore 9.0 has newly designed forms to replace WFFM. These are built in a modern way and are easier to configure and customise.

Upgrade Considerations

sitecore-logo
So there are clearly some significant benefits to carrying out an upgrade to Sitecore 9.2, especially if you are on 8.2 still, as some customers are.
There are some additional requirements and considerations when moving to Sitecore 9.2 and standard upgrade considerations which need to be planned for:

  • Additional Servers / Roles – Due to changes to the architecture to split out elements of Sitecore into smaller services Sitecore 9, 9.1 and 9.2 require some additional Servers and roles. These are for xConnect, Identity Server, Cortex and processing. When you are planning resources for your upgrade this should be considered, particularly on Azure as there are quite a few additional services required.
  • Module Upgrades – Most Sitecore sites will make use of a number of Modules to extend the out of the box functionality. Some popular modules are: Web Forms for Marketers (WFFM), Url Rewrite and Sitecore Powershell Extensions (SPE). It is important to ensure that each module you are using is supported in Sitecore 9.2 and to consider time for upgrading each module as part of the upgrade process.
  • Updated Licence – Most customers will require a new licence generating when upgrading to Sitecore 9 and above. Therefore ensure you request this from your account manager in advance and that you have all features/modules you require included on your licence.
  • Active Directory module – Sitecore 9.1 & 9.2 or later does not support the Active Directory module. Sitecore uses Identity server to handle logins instead of legacy methods such as AD. Therefore if you are upgrading to 9.1 or above and use the AD module you will need to implement an integration with Active Directory from Identity Server.
  • Search – Sitecore 9 and above no longer supports Lucene so you must use SOLR or Azure Search. Lucene did not work well in distributed search scenarios so moving to SOLR or Azure Search has been recommended for a while. SSL is also required for SOLR in 9.0.
  • Code & Configuration Updates – Sitecore try and reduce breaking changes where possible but sometimes they are unavoidable, so as with all Sitecore upgrades some custom code and configuration will need to be updated to be compatible with Sitecore 9.2.
    To assist with this process Sitecore does provide an Express Migration Tool (to get to 9.0) and an Update Installation Wizard to update to 9.2. However these tools will likely only get you so far for highly customised Sitecore implementations and will likely need some manual upgrading too. Any code that needs upgrading will not be auto-upgraded by the tool. If you are on 8.2 then there are quite a few changes for analytics with xConnect. All references in Visual Studio will need updating to 9.2 also.
  • Support Patches & Hotfixes – You will likely have some hotfixes or support patches that have been applied to your solution over time. These will need analysing as part of the upgrade to understand if they are still required or not in 9.2. Many of these may have been rolled into 9.2 already.
  • Analytics Data upgrade – Part of the upgrade process involves migrating xDB data in the 8.x format to Sitecore 9.2 format. Sitecore have a tool for this: https://dev.sitecore.net/Downloads/Sitecore_xDB_Data_Migration_Tool/3x/xDB_Data_Migration_Tool_300.aspx
  • Implementation Quality – Best practice Sitecore implementations do not customise any out of the box Sitecore files and instead use patch files and extensions to customise configuration and other Sitecore functionality. Ideally the base platform should be installed ‘as is’ and the customisations layered on top to assist with upgradability. Depending on how well your implementation has been carried out will impact how easy it is to upgrade. If your implementation is not best practice then your team should take the time during the upgrade to correct this and take advantage of some of the newer and better ways of doing this.

A Note on Upgrading WFFM

sitecore-formsOften one of the key stumbling blocks for upgrading Sitecore to 9.1 or 9.2 is Web Forms For Marketers, this is because it was deprecated in Sitecore 9.1 and is also not supported in Sitecore 9.2. Sitecore 9.0.2 is the last release where WFFM can be used. Sitecore Forms has replaced it.  If customers have many forms this can be a bit daunting.

So you could just upgrade to Sitecore 9.0.2 and stop there, but you would be missing out on a lot of features and you will need to upgrade again in the near future. Thankfully there is another option, there is now a community built tool to help automate this for you and convert WFFM forms and data to Sitecore Experience Forms: https://github.com/afaniuolo/WFFM-Conversion-Tool. I have yet to use this but have heard good things about it and it is regularly updated.

 

I’ve tried to cover the key features of 9.2 and considerations for upgrading here. As you can probably see the longer you leave an upgrade the more complex it becomes as there are more changes to consider. Frequent upgrades of Sitecore should be the aim as this will reduce the time and investment needed to carry them out. Hopefully you’ll find this post useful for planning an upgrade to Sitecore 9.2 and leverage the investment you have made in the platform.

Azure Switch On Rebuild Bug – Index name not always updating on CD Servers

azure-searchI have recently been assisting a client with moving their Sitecore 8.2 update 7 Site to Azure. As part of this we decided to use Azure search for our custom search indexes – available in 8.2 u7 and 9.0.2 and later . We ran into an issue when we enabled Switch On Rebuild as we found that on rebuild the index would sometimes return no results. This resulted in missing data on the pages powered by these custom indexes.

TL;DR

This is a bug with Azure Switch On Rebuild, you can request SC Hotfix-294596 from Sitecore Support.

Why did this happen?

I didn’t previously know this until I started investigating this further and asked on SSE but if you have Switch On Rebuild enabled then on rebuild of the index Sitecore creates a new index with a -secondary suffix and switches to that once the index has been rebuilt. It stores a reference to the Primary index name (the one in use) in the properties table of the Core database.

e.g Sitecore should change the name from ‘my-custom-index’ to ‘ my-custom-index-secondary’ and back again each time it is rebuilt.

Sitecore uses the index Id from your config along with the server name and url of the site to create a key in the core database to store the Primary and Secondary index names like so (sensitive information blurred):

core-db-primary-index

From further testing we were seeing that the value of the Primary index in the Core database is only updated on the CA server and not the CD Servers so after some further investigation and head-scratching I implemented a short term work-around with an custom admin page to allow us to manually update the index names in the with code similar to below:

var database = Sitecore.Configuration.Factory.GetDatabase(“core”);

var indexName = “my-custom-index”‘;
SwitchPrimaryIndex(indexName, “cd1-server”, true);

Following this I raised this issue with Sitecore Support for investigation.

Resolving the Issue Properly

After some further investigation Sitecore Support confirmed this is an bug with Sitecore XP 8.2 rev. 180406 (Update-7) – bug report #254072 and provide a hotfix: SC Hotfix-294596.

This is also an issue in 9.0.2 and likely any version below 9.1, this is resolved in Sitecore 9.1 Initial release.

The only file included in the hotfix is an updated version of the Sitecore.ContentSearch.Azure.dll, there have been a number of changes here.

The Hotfix addresses this issue by changing how the Primary and Secondary index names are stored. Instead of being stored in the properties table of the Core database these values are now stored in their own Azure Index called index-catalog. Here is a screenshot of how this looks in the Azure Portal:

index-catalog-new

In addition to this the Hotfix also renames the index using an random number instead of -secondary.  If you also have this issue you can request the Hotfix from support.

Thanks for Gert Gullentops for his help with this on SSE and Slack. Hopefully this will help others too.

Sitecore Update Package Timeout Issues

It’s been a little while since my last blog post as my Baby Daughter Char(Charlotte-Sienna) arrived 2 months ago which has made it a bit challenging to find time to write some. This seems to have happened to a bunch of Sitecore developers I know and it’s took me a while to get back to it.

I don’t have a Sitecore T-Shirt for her yet so given the lack of pictures in this blog post here’s one of her in an England shirt from back at the World Cup. It didn’t help, we still lost…

 

Update Package Woes

I recently had to upgrade a local Sitecore 8.2 update 6 instance to 8.2 update 7 using the Sitecore Update Installation Wizard and ran across a timeout issue which was as follows:

‘Sitecore.Shell.Upgrades.PostStep,Sitecore.Client’
Error executing post step (Sitecore.Shell.Upgrades.Bug118164PostStep): System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. —> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) …

There was more to the error but you get the idea. It looked like an issue with SQL Timeouts. I wasn’t sure why as on my local machine (with a local database) connections should be pretty quick.


TL;DR

Close all other programs / browser tabs to free up RAM & Processing power, make some config changes and add the patch file at the bottom of this post to Sitecore (Temporarily – delete it afterwards) to avoid the timeout issues during update package installation.


upgrade-log

I tried a few more times, waited a while, tried again and still no joy. A bit of Googling and I cam across a few posts related to update package install issues, this one on SSE being the best:

https://sitecore.stackexchange.com/questions/2772/problems-while-installing-an-update-package

There was lots of useful info here, some of it seemed to help, some of it didn’t.

Interestingly a number of people reported having this issue on other environments where connections might have more latency such as UAT or Production.

How I fixed it

I tried doing just a few of the things mentioned in this SSE post (and others I found) but in the end I needed to do all of the following to get the 8.2 update 7 update package to finish installing:

I thought it would be useful to share this so others can quickly move past these errors without wasting lots of time like I did.

Also I’ve not tried this in Sitecore 9 but I’d imagine most of these steps will still help (some updates will likely be needed to the config patch file for role based config).

Steps to resolve the issue

    1. executionTimeout – Edit the web.config and change the following setting for executionTimeout to set it to 18000:

      <httpRuntime targetFramework=”4.6.1″ maxRequestLength=”512000″ executionTimeout=”18000″ enableKernelOutputCache=”false” relaxedUrlToFileSystemMapping=”false” requestValidationMode=”4.0″ enableVersionHeader=”false” />

    2. Ping Maximum Response Time – In IIS, go to the app pool used by Sitecore and either change the ‘Ping Maximum Response Time (seconds)’ to 600 seconds or other larger value or set ‘Ping Enabled’ to false.
    3. Clear Down Previous Upgrade Files & Logs – Remove/Archive any folders here: \temp\__Upgrade. It’s also worth clearing down your Sitecore logs to make it easier to debug.
    4. Config Patch – Apply the config patch file below (add any additional indexes to disable)
    5. Try Again – Re-start the installation of the Update and package. Hopefully it succeeds this time!
    6. Undo Config Updates – Roll back the updates made in steps 1,2 and 4.

Config Patch

The following config patch should be copied into your /App_Config/Include folder. Please add any other custom indexes that you need to disable or make changes if you have renamed any.

Also Please ensure you delete this patch file after you have completed the update.

Some useful links:

https://sitecore.stackexchange.com/questions/2772/problems-while-installing-an-update-package

https://sitecorebasics.wordpress.com/2014/06/21/sitecore-version-upgrade-troubleshooting-basics

https://sitecorebasics.wordpress.com/2012/02/26/browser-timeout-error-while-doing-sitecore-version-upgrade

https://kiranpatils.wordpress.com/2012/02/26/long-running-processes-and-browser-timeout-issue-mainly-internet-explorer

Anyways I hope this is helpful for others who have this issue.