EditContext vs. Item.Editing in Sitecore

So, the other day a co-worker asked me about my thoughts on using the EditContext class as opposed to using item.Editing for editing an item using the API in Sitecore.  I did a lot of research on the 2 and what the diferences are and decided to put this up for either someone to correct me in my conclusion or at least to share my findings in a way that might simplify things for others.

Ok.. so to start, lets start with the basics.  In Sitecore, when you want to edit an item using the API, you first need to put the item in Editing mode. Make your edits and then remove the item from edit mode.  Editing an item, in the simplest possible code would look something like this:

item.Fields["Title"].Value = "My New Title";

Now, as you can see, there’s a method that needs to place the item in the editing mode… plus you have to remember to remove the item from editing mode, plus make sure that the “user” that is doing so has permissions (and either use a securitydisabler or switch user context) as well as some other considerations less apparent than these.  Fortunately, Sitecore has included a class that provides a quick and easy way of doing this.  The above edit can be done instead with this:

using (new EditContext(item)) { item["Title"] = "My New Title"; }

The above statement does the same and more.  First of all, the EditContext constructor takes an item as a parameter and then does item.Editing.BeginEdit().  Also, since its declared in a using statement (since it inherits from IDisposable), the Dispose function is guaranteed to be called which automatically call the item.Editing.EndEdit() using optional boolean params (which I’ll talk about in a second) or the defaults (true, false). No muss, no fuss.

Now, as I mentioned.. there are some optional params.  One is that you can pass it the item with the SecurityCheck.Enable or SecurityCheck.Disable parameter.  Imagine if you wanted to update an item that is a dependency for another item that the user is editing that they do have access to but the dependency item is not one that the user has access to. This allows that to happen without the need to use a SecurityDisabler or switch user contexts.

More importantly, imho, is the other method signature which allows you to pass it 2 bool values that represent “UpdateStatistics” and “Silent”.

  • UpdateStatistics – This just lets you control whether or not the item statistics fields will be updated (when updated, who updated, etc.).  Among other scenarios, imagine a situation where you have a batch process that will reset a flag of some sort on your item, but want to leave the last edited by field to the person who actually did the edit.  Set this flag to false and it simply updates your items without the changing the statistics of the item.
  • Silent – This is a biggie! This lets you disable any of the Events that will be triggered by the edit… such as the Item:Saved event.  This is helpful in situations like the above mentioned batch job.  Say you wanted to update the flag, but don’t want to have that item now added to the publish queue.  Basically, setting this to true will simply update the value without triggering all the other stuff that happens next.

So basically, using the EditContext object does the same but it wraps everything up for you in a nice package.  Sitecore standards prefer the use of the EditContext class as a quick and easy way of editing an item. I think this is probably the case because it handles doing all the stuff that can be forgotten and lets the coder focus on what is to be edited without having to worry about all the other potentially bad things that can be forgotten.  In a nutshell, it still does all the same stuff as the item.Editing class but allows one to do so within a using context which wraps it all up nicely. It’s definitely my choice for making edits to an item using the API.

By the way, be careful with changing the Silent flag.  I recently saw an instance where a call that was being made in the custom method that was run when an item was created.  It checked for a certain value and if that field’s value matched the criteria, it updated another field’s value…. however, the silent flag was set to true with updateStatistics being false.  There were some odd things that happened.  Why they happened is a different story and unrelated, but what it amounted to was a mess where basically the item update triggered a new version to be created and then both item versions set to publish which was an even bigger mess.  You may see the logic in doing this, but as I’ve seen, it caused some unexpected results.

Referencing Code File in Sitecore Presentation

I started this a long time ago but never posted it.  Thought I would share it now…

Let me preface this by saying that this was work from an agency partner that did some work for a client I worked for.  The company had decided to do their site in house… and with good reason.  This was a 3rd party agency that created it originally.  This has allowed me some insight into some new practices that I cannot help but say to myself “You didn’t quite think that one through, did you?”.  I’d like to share a one of those things:

  • Sitecore layout type items should NOT… — EVER — point to the same code file.   For example:  (the following are SitecoreSublayout Items created in the Presentation area)
    • Generic Sublayout item  field:  ascx file =   “/layouts/sublayouts/genericSublayout.ascx”
    • Foo  item field:  ascx file =   “/layouts/sublayouts/genericSublayout.ascx”
    • Bar item  field:  ascx file =   “/layouts/sublayouts/genericSublayout.ascx”

While this may seem like a good idea, this makes it absolutely IMPOSSIBLE for you to know the consequences of making changes/updates to the genericSublayout.ascx file since you have no idea what items are using the code.  The only thing I can think of why they did this is to maybe change the data source.. in which case, I can think of many other ways that are better than having multiple Sitecore items point to the same code file.


ECM Users and Roles

Let me state that one of the things I have to do is help clients come up with a solution for some situation that they find themselves in and Sitecore doesn’t have an out of the box solution for.  Tonight I had a request from a co-worker to see if I had any ideas on how to clean up a mess they made trying to implement Email Campaign Manager without any real plan for what they doing or the impact that it would have on the site.  Essentially, what happened is that a young, eager beaver developer read through what ECM did, decided it was the perfect tool to handle the all the correspondence that they sent to their users and promptly installed the module for a closer look.  After a quick investigation, he found the import function, quickly downloaded their userbase into CSV and started the import process happily on his way to sending glorious emails.  At some point he either decided it was taking too long or something.. but he managed to make a huge mess out of the user base that they had.  I’m not sure the whole extent since this was a co-worker, but now they needed to know how to get rid of all those users out of their database.  Sitecore, by default, allows you to delete users.. one at a time.  This is just not feasible if you mistakenly import your whole user base in and decide you don’t want it.  I’ve done that before and ended up just starting with a fresh Core database so then used serialization to get my data back. I happened to be working on another thing for another client that was actually the exact opposite of this situation and decided that if I could use the API to import users.. I could do it to get rid of them.   I built out a page that handles this and thought it might come in handy to someone else out there.   I’ve tested this briefly with test content and it worked just fine.  Your results may vary.. so please, please, if you use this, back up your CORE database first.  It’s only something I wrote for a quick fix that might be easier than starting with a fresh Core DB.

This is a simple .aspx page that I would suggest placing in your /sitecore/admin folder.  That ensures that only an administrator level user can access it at all.  Once logged in, it will allow you to choose a domain.. which auto populates all the roles for that domain.  The domain selection wasn’t really necessary, but I also had the idea that you could edit the selection of domains to restrict someone from accidentally deleting something like your whole extranet user base by accident. You then choose the role that you want to remove and presto.. any user that belongs to that role will be deleted along with the role.  Again, this is NOT really meant for anything other than cleaning up an ECM install or some other situation that you need to get rid of a lot of users in one fell swoop that are stored in the Core database so don’t leave nasty grams complaining that it didn’t work for you if you are doing anything other than using the out of the box Sitecore ASP.NET membership provider.   Also, if you simply want to remove users from roles, this can easiliy be edited to do that.. but at this time, it is NOT.  This deletes the user account and the role completely.

Finally, I have, by default, disabled this page by default.  One must edit the page, similar to how some other admin type of pages that come with Sitecore are configured to work. Enabling or disabling it means manually editing the .aspx page and setting a property on the page to true.. which enables and disabled the button that submits things.  Enjoy and again, please note that it’s very late and I’m very tired and if you find obvoius flaws. please share them politely so that I may correct my code.

Thank you and happy Sitecoreing!

<%@ Page Language="C#" AutoEventWireup="true" %>
<DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
// TODO: to enable the page, set enableUnlockButton = true;
private bool enableUnlockButton = false;

protected void Page_Load(object sender, EventArgs e)
 this.SubmitButton.Enabled = this.enableUnlockButton;
 if (!Page.IsPostBack)
 this.Domain.DataSource = Sitecore.Configuration.Factory.GetDomainNames();
 this.Domain.Items.Insert(0,new ListItem("Please select a domain",""));
 SubmitButton.OnClientClick = "return confirm('Are you sure you wish to delete the users in this role and the role?');";

protected void SubmitButton_Click(object sender, EventArgs e)
 if (Roles.SelectedValue.Length > 0)
 List<string> users = new List<string>(System.Web.Security.Roles.GetUsersInRole(Domain.SelectedValue + '\\' + Roles.SelectedValue));
 if (users.Count > 0)

foreach (string s in users)
 System.Web.Security.Roles.DeleteRole(Domain.SelectedValue + '\\' + Roles.SelectedValue);
 Domain.SelectedIndex = 0;
 catch (Exception)


protected void Domain_SelectedIndexChanged(object sender, EventArgs e)
   if (Domain.SelectedValue.Length > 0)
      List<string> roles = new List<string>();
      foreach (string s in System.Web.Security.Roles.GetAllRoles())
        if (s.Contains(Domain.SelectedValue))
           roles.Add(s.Remove(0, s.LastIndexOf('\\') + 1));
      Roles.DataSource = roles;
 catch (Exception)

protected void descriptionLiteral_PreRender(object sender, EventArgs e)
   this.descriptionLiteral.Visible = !this.enableUnlockButton;
<head runat="server">
 <title>Remove Users in Sitecore Role</title>
<style type="text/css">
   font-family: normal 11pt "Times New Roman", Serif;

   color: red;

 <form id="form1" runat="server">
 <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <asp:Literal runat="server" ID="descriptionLiteral" EnableViewState="false" OnPreRender="descriptionLiteral_PreRender">
      <p>This page is currently disabled.</p></pre>
To enable the page, modify the ASPX page and set enableUnlockButton = true.
    <h1>Remove All Sitecore Users in a Sitecore Role </h1>
    <h2>Use this form to remove all users permanently that are in the selected Domain and Role.</pre>
    <h2>In order for this form to work, it must be placed in the /sitecore/admin folder.&nbsp;</h2>
    <h2 class="Warning">PLEASE BACK UP YOUR CORE DATABASE! </h2>
    <h2 class="Warning">This is NOT reversible!! Please make sure you know what you're doing!!!</h2>
           <td style="width:200px;">
             <asp:Label ID="DomainLabel" runat="server" AssociatedControlID="Domain">
              <asp:Literal text="Domain:" runat="server" />
           <asp:DropDownList AutoPostBack="true" ID="Domain" runat="server" style="width:300;" onselectedindexchanged="Domain_SelectedIndexChanged" />
            <td align="right">
             <asp:Label ID="RolesLabel" runat="server" AssociatedControlID="Roles">
             <asp:Literal Text="Roles:" runat="server" />
             <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <asp:DropDownList ID="Roles" runat="server" />
                <asp:PostBackTrigger ControlID="Domain" />
            <td><asp:Button ID="SubmitButton" runat="server" Text="Submit" OnClick="SubmitButton_Click" /></td>

HTML5 and Video in Sitecore

Not long ago, a client came to us and asked what sort of support Sitecore had for videos and HTML5.  Now let me preface this by saying that I am NOT a front end developer.  Given the choice, I’d rather pull my toenails out with pliers over writing javascript and doing front end development.  So when a client asked about the support Sitecore had for HTML5, I didn’t have a clue what they were referring to.  That being said, I set out to learn all I could about video and HTML 5.  First impression is that I like it.  In looking over the basics and how it works via the W3 schools HTML5 tutorial, it feels like this is how html should work!.  Now.. that being said, how can/does this fit in with Sitecore?

What is HTML5?

Before we get into that.. lets first define exactly what makes HTML 5 unique when it comes to video.   The first thing to note is that this is NOT like a YouTube embedded video.  It will look like a YouTube style video possibly, however, the major difference here is that you are linking to the direct videos.. not linking to a 3rd party hosted video.  The second thing to note is that because HTML is so new, not all browsers support all video codecs.  So you’re going to have to make some decisions about the videos you’re linking to.  The third thing is that the codecs that are supported by HTML are VERY specific.     Now.. that being said.. what codecs are supported?

  • MP4–  MPEG 4 files with H264 video codec and  AAC audio codec
    •  Support:  
  • WebM –  WebM files with VP8 video codec and Vorbis audio codec
    • Support:  
  • Ogg= Ogg files with Theora video codec and Vorbis audio codec
    • Support:  

So now that we know what formats are supported and by what browsers, the next step for you will probably be to convert the your video. As you can see.. there is no advantage to adding the webm format, so I didn’t include it in my code samples.  I did a search out on the internet and the general consensus seems to be that for a free converter, your best bet would be to go with the Miro Video Converter.  It’s free, easy to use, just pay attention to the fact that not all conversions can be done from all formats.  For instance, mp4 to webm does not work.. but doesn’t warn you.  Once you have your new files.. we’re ready to go! Here’s the basic syntax for the tag:

<video width="320" height="240" controls="controls">
  <source src="movie.mp4" type="video/mp4" />
  <source src="movie.ogg" type="video/ogg" />
  <source src="movie.webm" type="video/webm" />
  Your browser does not support the video tag.

Integrating this with Sitecore

Looking at the Sitecore modules out there, there isn’t one specifically for this, so I’ve taken it up to write a module to do this and update this when I’m done.  However, until I iron out all the details, here’s how you can do this manually.  The first thing I did was create a new Sitecore template.  I added a File field for each of the file types supported.  Secondly, there are several attributes that you can add to the <video> tag and I added a field for each of these.  Here’s how my Sitecore template is set up.  These are not necessary, but allow for the most freedom in choosing how your video player will display.

Bind to Sitecore Presentation Layer

How we bind to presentation is accomplished any number of ways, but for the sake of showing how it works, I’m going to stick to the easiest and most basic way of doing this. So, we want to bind the new template item with a Sitecore rendering or sublayout. You can do this dynamically by setting the “DataSource” on a sublayout when you select it in the Presentation dialog for your item. You can find more here on how to get the Datasource for a sublayout here. From there, it’s just a matter of binding the fields to your tags. In my example, I created a literal for each of the source tags as well as one for all the attributes that you can use on the

if (this.DataSource != null && !this.DataSource.Empty)
   int h, w;
   StringBuilder sb = new StringBuilder();
   if(Int32.TryParse(DataSource["Height"], out h))
     sb.Append(" height=" + h);
   if (Int32.TryParse(DataSource["Width"], out w))
     sb.Append(" width=" + w);
   if (Helper.GetCheckbox("Controls",DataSource))
     sb.Append(" controls='controls'");
   if (Helper.GetCheckbox("Muting", DataSource))
     sb.Append(" muting='muting'");
   if (MediaManager.HasMediaContent(Helper.GetFileMediaItem(DataSource, "Thumbnail")))
     sb.Append(" poster='" + Helper.GetImageMediaUrl(DataSource, "Thumbnail") + "'");

   attributes.Text = sb.ToString();

    mp4Source.Text = (MediaManager.HasMediaContent(Helper.GetFileMediaItem(DataSource,"mp4Source"))) ?
       "<source src="&quot; + Helper.GetMediaFileLink(<span class=" span="" class="hiddenSpellError" pre="class " />hiddenspellerror="" pre="" />DataSource, "mp4Source") + "" type="video/mp4" />;" : string.Empty;
    oggSource.Text = (MediaManager.HasMediaContent(Helper.GetFileMediaItem(DataSource, "oggSource"))) ?
       "<source src="&quot; + Helper.GetMediaFileLink(DataSource, &quot;oggSource&quot;) + &quot;" type="video/ogg" />;" : string.Empty;
   this.videoPlayer.Visible = false;

Now.. the beautiful part is that Sitecore will actually handle these for your just fine as media library items. You can simply upload your files to Sitecore’s media library and Sitecore will handle the .ashx links (p.s. The “Helper” class is just a personal Sitecore specific helper class to handle common tasks). The last part that is essential to making this work is that you’re going to need to tell Sitecore how to handle these new file types. You can add this to your mimetypes.config file:

  <mediaType extensions="mp4">video/mp4
  <mediaType extensions="ogg,ogv">video/ogg

I’ve tested this and it works great in all the browsers I tried (although you’ll have to use IE9 mode to make it work in IE9). Look for my module here soon. Also, there are quite a few video players out there. I have chosen not to cover those because I found that they vary a lot and the point was to show how Sitecore and HTML 5 video can be integrated. The players offer a lot of flexibility, but at a cost either financially or in a large learning curve. I’ll leave it to you to explore those options if you desire.. but for some simple inline videos.. I find that these work just fine. 🙂

Happy Sitecoring!

WFFM Custom Field Type made easy!

Anyone who has used the Sitecore module “Web Forms for Marketers” knows that although the module is absolutely the coolest thing ever to let marketing people create all their own forms, if you’re a developer and you need to make a form that has a form field with any bit of back-end logic to it, there’s just no way to do any of that with the out of the box form fields.  There is some excellent documentation out on the SDN for creating custom user fields.. however, it’s not complete in that there are 2 types of forms fields – A User control field type (basically an ascx type of file) and a Web Control that you would create from scratch.  The documentation covers creating the web control type of field.  However, I think most people would find it much more useful to create a simple ascx type file to extend a normal field type to allow for back-end business logic to be performed.  This is my purpose for this post.

So basically what I was needing was to be able to take a drop down list, populate it with Sitecore type data..which you can do.. except that this data required a complex query to filter items.. and then the items needed to be sorted.  Sitecore query handles that query very well.  Anyone who has built a template has gotten familiar with this and the module handles that quite well.  The problem is that there just isn’t any way to put an inline command for sorting and WFFM doesn’t have any out of the box way to sort data dynamically generated date in the drop down field type.

The thing to realize is that user control field types really are just a basic user control that extends the WFFM base user control – Sitecore.Form.Web.UI.Controls.BaseUserControl.  Also, in order to use the “Title” that is specified in the form designer, you’ll need to implement the  Sitecore.Form.Web.UI.Controls.IHasTitle interface.

Oh and lemme add this because you’ll need it for the sorting:

public class SimpleComparer : Comparer

{<br />
   // This just compares the items and sorts them by their name.<br />
   protected override int DoCompare(Item item1, Item item2)

   {<br />
      string x = item1.Name;<br />
      string y = item2.Name;<br />
      return x.CompareTo(y);<br />
   }<br />

This is easy enough to do.. but since it took me a bit to sort through the WFFM assembly to find out what it was doing, I’ll save you guys some of the trouble.   I tried this in a 6.5 instance with WFFM 2.3 and my control worked beautifully.   Basically your control needs to inherit a few classes and then create your control like you would any other control. And no comments about my choice of coding techniques! I don’t care.. that’s not my point.

    // The control must inherit either &quot;BaseUserControl&quot; for user controls or &quot;BaseControl&quot; for web controls.  I also<br />
    // implement the IHasTitle interface to allow the user to set the title for the field in the form designer diaglog.

    public partial class CustomFormDropdown : Sitecore.Form.Web.UI.Controls.BaseUserControl, Sitecore.Form.Web.UI.Controls.IHasTitle

    {<br />
        // This sets the value of the label to be the value set by the user in the form designer.<br />
        public string Title<br />
        {<br />
            get<br />
            {<br />
                return this.DropLabel.Text;<br />
            }<br />
            set<br />
            {<br />
                this.DropLabel.Text = value;<br />
            }<br />
protected void Page_Load(object sender, EventArgs e)
        {<br />
            //create my collection of Sitecore items with a Sitecore query.  This can be done however works best for you.<br />
            //This list, actually, is collecting all the Workflow action items.. for no other reason than that I didn't want to bother creating it<br />
            List selectionItems = new List();

//Sending item collection off to a comparer class.
            SimpleComparer com = new SimpleComparer();

<p>            //binding the data to my drop down list item.<br />
            ActionTitle.DataSource = selectionItems;<br />
            ActionTitle.DataValueField = &quot;ID&quot;;<br />
            ActionTitle.DataTextField = &quot;Name&quot;;<br />
            ActionTitle.DataBind();<br />
            ControlContainer.CssClass = this.CssClass;<br />

Now that you have created your user control, the last step is to implement the code that WFFM will need to be able to get the value from our form field. You can also implement some of our custom properties as well. Depending on what you put in this area, you can add additional fields to your form designer.

<p>        // Properties that are added by the form designer.  These are purely optional and are here to show you that you can do this if you want<br />
        // Notice there are properties such as "DefaultValue" that can be left blank.

        [VisualProperty("Css Class:", 600), DefaultValue ("scfDroplistBorder"), VisualFieldType(typeof(CssClassField))]

        public string CssClass { get; set; }</pre>
<p>        // Properties<br />
        [VisualProperty("Help:", 500), VisualFieldType(typeof(TextAreaField)), Localize, VisualCategory("Appearance")]

        public string Information { get; set; }</p></pre>
// Take note!!  This is the mucho important part!!!
        // This is required by WFFM to get the value from the drop down when the user submits the form.

        // This is all the code you need!<br />
        public override Sitecore.Form.Core.Controls.Data.ControlResult Result<br />
        {<br />
            get<br />
            {<br />
                //ControlName is automatically set by WFFM.  Don't set this.

                //The second part is for a string to represent the value of your drop down.<br />
                //The 3rd one is for optional parameters and is completely optional.

                return new Sitecore.Form.Core.Controls.Data.ControlResult(this.ControlName, this.ActionTitle.SelectedValue, null);<br />
            }<br />
        }<br />

Here’s my simple html ascx page.

<asp:Panel ID="ControlContainer" runat="server">
  <asp:Label ID="DropLabel" runat="server" CssClass="scfDropListLabel" AssociatedControlID="ActionTitle" />
  <asp:Panel ID="DropDownPanel" CssClass="scfDropListGeneralPanel" runat="server">
    <asp:<span class="hiddenSpellError">DropDownList runat="server" id="ActionTitle" CssClass="scDropList" />
    <asp:Label ID="dropDownHelp" Style="display:none" runat="server" />
<br />

Now as I said, there were some optional fields that you can set up to show in the form designer. If you don’t do that.. then your form field will have no fields other than the title and analytics which is handled within Sitecore anyway. Once you have your user control saved, go into the /sitecore/Settings/Modules/Web Forms for Marketers/Settings/Field Types/Custom , create a new item using the Field Type template. Then down in the “code” area of the item, put in the link to your control “/controls/CustomFormDropdown.ascx” (without the quotes).

Now, when you create or edit forms, you’ll have your new user control available and it should return its value without incident and you now have a snazzy new form field type for future use.

Please let me know if I’m forgetting anything here..

Sitecore install error: Web Client Service is Unavailable

I recently had a client who was trying to install Sitecore and they got this error.

I know that I’d seen the error before but I couldn’t remember needing to take any special steps to fix it.. or find any issues that resulted from it.  When I tried to find more about it, I also didn’t find a lot of meaningful documentation without a lot of digging around.  Although this is not a serious error.. and really not even an error, it can be distressing to someone who is trying to install Sitecore for the first time.  I thought I would share what it means and what to  do about it.  First off, let me give props to Sitecore Guild for this post which pointed me in the right direction.

As it turns out, this error is happening when Sitecore tries to configure Webdav support during the installation process… which in case  you’re not familiar.. is a protocol that allows for transfer of files via a web share (as opposed to having to map a network drive or using FTP).  The support for Webdav in Windows happens via the web client service and the error is occurring because it is unable to properly configure IIS to support Webdav for your site without the service running.  It happens in particular when you try installing Sitecore on a Windows Server 2008 install because the default installation does not install the Desktop experience package.  This service is not needed for any other purpose other than to enable Webdav, so if you’re not using Webdav, it won’t matter to you at all one way or another.  In Windows XP, Vista and Windows 7 it’s available and enabled and Windows Server 2003, it’s installed .. although it’s not enabled by default.   I suspect that a lot of developers (myself included) probably installed Sitecore for the first time on their own laptop.. which would have it enabled by default.  Once they played with it and felt comfortable, they go to install on the server suddenly this unknown error pops up.

Now.. to answer your next question.. what do you do about it?  The answer, quite simply, is click ok and proceed with the install.  As I said, this is really more of a warning than an error.  Sitecore still configures your installation to support Webdav.  It doesn’t (as near as I can tell) change much of anything with the installation and mostly affects the configuration of the new IIS site.  If you know that you’re going to need Webdav, you have 2 options.  The first is that you can still do nothing.  Webdav requires additional configuration in addition to what is set up during the install process and you can wait til later.  The SDN  has a whole document that covers Webdav configuration, including the steps to enable this service.  If you would rather, you can also back out of the installation and go enable the service and then try installing.  You can find detailed instructions on how to do that here.

Either way, this error is not serious and should not stop you from finishing up with your Sitecore install.  It’s merely a warning about a lack of Webdav support and unless you’re using Webdav, there’s no reason at all for you to worry about it.

Hope this was helpful!  Happy Sitecoring!

Sitecore upgrade assistant?

So welcome to my first post on my Sitecore experiences blog.  As a Sitecore Solutions Engineer, I thought it was about time to start my own blog of my experiences with Sitecore and hopefully be able to pass along some of my own knowledge and experiences to all of you.  What I am currently working on and would welcome feedback on is the upgrade process for Sitecore.

I recently had a customer who was trying to upgrade from Sitecore version 6.1.x and they wanted to get to the current Sitecore recommended version.  In doing so, they would have had to go to the upgrade page and go through the process of mapping out all the individual updates they would need to install to get them to the current version.  We ended up providing them with the update versions to install.. which was done via a manual process of looking at each update and finding out a prereq and then adding that prereq version to the list.  With Sitecore there isn’t a clear upgrade path that allows for you to just install “the upgrade” and be done with it.  Since there are so many different updates and most updates have a prerequisite update that you have to have installed before you can install that update, this can be quite tedious and involve installing 4-5 installs.  This still doesn’t sound like that big a deal until you throw in the fact that you have to walk through about 8-10 steps per upgrade.. which doesn’t include counting all the steps to adding things to .config files.. which can be several steps as well.   To further complicate this, not all upgrades are needed.. only certain ones.. and there are also “optional” steps to the upgrade process.  All of this has to happen and if you miss a step, you could potentially have to start again (i.e. my customer didn’t have a backup for each update and had one of the upgrades gone wrong, he would have had to start at the beginning after doing a restore).  The more complex the Sitecore install is, the harder this whole process is going to be.  I also have to mention that there are lots of modules out there that also have upgraded separately from the actual upgrade.  All of this makes for quite the undertaking and there doesn’t seem to be an easy route to doing all this.

I have decided to try to build a web based upgrade assistant.  No.. it won’t do the update for you… but it will help you in figuring out what you NEED to install.. what files you’ll need to do so.. give you some step by step instructions, provide you with links to modules (at some point.. not sure how easy that will be since there are so many that are 3rd party) and then if there are optional steps to consider in the update, .. it will help you make informed decisions about those decisions (sometimes this is rather complex.. and given that there are going to potentially be a lot of times where a developer isn’t even familiar with Sitecore going into the install process, making these sorts of decisions really ends up requiring some help from Sitecore Support).  So this is my goal.   Wish me luck. 🙂

If you have any feedback or comments.. I welcome them.