In a previous post I wrote about how you can create a site template in SharePoint that you can reuse over and over. Unfortunately, that was not the case recently.
When recently attempting to create a new site using an old template the following message was displayed.
What this basically means is that a SharePoint feature was available when the template was created but is no longer available when the template is is used at some later date. This is because when you create a SharePoint template it has a look at the current environment and remembers what features where enabled.
Normally you see this when you create a template in one site collection and then move it to another site collection which doesn’t have the same features enabled. Strange thing in this case is that the template was begin used in the same site collection in which it was created. Also, nothing had changed in the site in relation to features so this error was puzzling.
Biggest problem was that a new sub-site could be not created from this template due to the missing feature. The even bigger issue was I couldn’t locate where this feature was in SharePoint to try and enable it
Now, given the name of the feature BPOSExtranetFlag, I had a suspicion that it referred to something that had been removed after upgrade of Office 365 (as BPOS was the original name for Office 365). Was that then something Microsoft removed?
Before we get into the why let’s cover off how I managed to resolve the issue. Now what basically needs to be done is for the SharePoint template file to be modified so that the reference to the BPOSExtranetFlag can be removed. A SharePoint template file is saved as a .WSP extension, but if you rename it to a CAB file and use an unzip program you can get to the files inside. Rather messy.
A better option is here from Office 365 MVP Rene Modery:
Basically, you can strip out the reference using a PowerShell, which I used. The new template was uploaded to the site and everything worked as expected now.
Beyond this however, the cause of this issue gives me concern. Why? Well I don’t have confidence any more in recommending to people they create SharePoint site templates. Why? Because they may find down the track that they can’t use them because a features has been removed by Microsoft without their knowledge.
The only information I can find about what happens with Office 365 updates is here:
and unfortunately it doesn’t mention anything about the BPOSExtranetFlag feature being removed. Without this I don’t have the confidence to create templates because the underlying structure could change rendering my templates unusable. Sure, I can solve the problem using PowerShell but that’s not something average users can do is it?
There needs to be a better solution here from Microsoft. Either allow templates to be created WITHOUT the inclusion features somehow or provide some simple tool (maybe via the SharePoint apps store) that can remove depend features from templates.
For the time being I therefore recommend that instead of creating templates you create a blank subsite you wish to have as a template and leave it empty and template it as you need it. That way, with the original site still present, your template will always work. If you create a template and delete the original site (like what happened in this case) you’ll either have to use PowerShell or recreated your original site. Not fun either way.