Site Under Maintenance – SUM allows to place your sitecore website under maintenance mode and display a healthy message to your website visitors. This module come in handy while you might be carrying out maintenance, deployments, fixing defects, upgrading your website, moving or restructuring your content.
SUM is also available on sitecore marketplace. Download SUM from marketplace.
We had a request from one of our client to have a maintenance page while we were deploying changes for a rebranding. The requirement was to keep the sitecore content manager available in the background but the internet facing website should display a maintenance message. Content delivery and manager were on the same sitecore instance and on a single IIS website. One might think of using the standard procedure of placing the APP_Offline.htm in the root directory of the website which allows to display a maintenance page. However this will also bring down the access to content manager. Hence changing of content and publishing might not be possible.
The other option, a bit complicated and tedious is to have two websites with same host header as the live one, yes definitely one site would be in stop mode. Then as required these two sites can be switched on / off once the maintenance is over.
I thought to have a more sophisticated way for achieving this and came up with SUM.
– Supports single and multi-site sitecore instance.
– The maintenance page can be built using your own layouts and sub layouts to match your site theme.
– Multi lingual maintenance page.
– Option to turn on/off the maintenance mode.
– Content delivery and content manager server is same or separate.
– Easily installed as a sitecore package.
– Can be plugged with Sitecore 6.4 to 7.2.
Installation of SUM is quick and easy, it is bundled up as a standard sitecore package. It can be downloaded from Github repository here. The package includes following items and code files,
• /sitecore/layout/Sublayouts/SUM/Maintenance Sublayout/
• /sitecore/media library/Images/SUM/
• /sitecore/media library/Images/SUM/site-under-maintenance-1/
• /sitecore/templates/SUM/Site-Maintenance/__Standard Values/
• /sitecore/templates/SUM/Site-Maintenance/Site Maintenance/
• /sitecore/templates/SUM/Site-Maintenance/Site Maintenance/MaintenanceContent/
• /sitecore/templates/SUM/Site-Maintenance/Site Maintenance/MaintenanceImage/
• /sitecore/templates/SUM/Site-Settings/__Standard Values/
• /sitecore/templates/SUM/SUM-Data-Template/Site Maintenance/
• /sitecore/templates/SUM/SUM-Data-Template/Site Maintenance/MaintenanceLink/
• /sitecore/templates/SUM/SUM-Data-Template/Site Maintenance/SwitchSUM/
2) Code files
How to install SUM?
SUM comes as a standard sitecore package and can be installed using Installation Wizard from Sitecore Desktop. Follow below steps for installation of SUM,
Before starting the installation make sure the pop-blocker for your site is disabled.
1) Open Installation Wizard from Sitecore Desktop
2) Upload Site maintenance – SUM-1.0.zip
3) Click Next
4) Click Finish
5) On Installation Wizard dialog you will see Site Maintenance – SUM-1.0.zip package, now click Next
6) Click Install
7) Click Finish, the installation of SUM is now finished, next follow configuration section of this document.
Changes to your website’s web.config file is not required as it is taken care by /App_config/Includes/sum.config. This module uses Include File Patching Facilities technique hence no manual configuration is required.
You can verify the configuration changes by using /sitecore/admin/showconfig.aspx where SUM.Pipelines processor would have been added before ExecuteRequest processor.
How to disable SUM?
In case you need to disable SUM module, you should rename /App_config/Includes/sum.config to /App_config/Includes/sum.config.disable, the standard way sitecore suggests for disabling any config file.
Site-Setting items needs to be sibling of StartItem for a site.
1. SiteMaintenance Pipeline
The pipeline checks for the context site, startitem and finds the site-settings item, a sibling of start item. On the site-settings item it performs a check on SwitchSum field for the maintenance page to be on / off. If the switch is off -> do nothing and exits the pipeline. If switch is on it will take the maintenance page link from “MaintenanceLink” field and redirects to it.
Note: Site-Setting item needs to be sibling of home item.
2. SwitchSUM Field
This field is responsible for making the maintenance page on / off. It is kept shared field deliberately as in case of multi-lingual site, maintenance page should appear for all languages.
3. MaintenanceLink Field
Sum pipeline will redirect to a page that will be selected in this field.
4. Maintenance Sublayout
It give the flexibility of changing the image and content based on the theme of a site.
Complete code for SUM is shared and available on GitHub at SUM. You can download it and modify as per your needs also.
Sitecore package is also available on GitHub as SUM – Sitecore package.
1) Single Site
Below is an example scenario and architecture of content tree where SUM can be helpful for single site instance.
Below is an example scenario and architecture of content tree where SUM can be helpful for multi-site instance.