Deprecated: YoastSEO_Vendor\Symfony\Component\DependencyInjection\Container::__construct(): Implicitly marking parameter $parameterBag as nullable is deprecated, the explicit nullable type must be used instead in /home/nubelus/sharedove/adisjugo/wp-content/plugins/wordpress-seo/vendor_prefixed/symfony/dependency-injection/Container.php on line 60
Give me some Features... (Site creation troubles, missing features, SharePoint localization, Routing Workflows and other bad jokes) - Adis Jugo blog
Select Page

Give me some Features… (Site creation troubles, missing features, SharePoint localization, Routing Workflows and other bad jokes)

This blog post was included in “” selection from June 1st 2012.

It has happened to me often enough, and I can’t guarantee that it won’t happen again…

Today, again, I was happily copying a site definition from one server to another: I saved it as a template, uploaded it into solution gallery onto destination server, created a new site out of that definition and than – bang!

errormessage

OK, we know the drill, some reeeeaaaaaly important feature has not been activated in my destination Site Collection. Quick copy/paste of the missing feature ID in the search engine of your choice (there is more than enough sites and blog posts out there, with all important features listed), and voilà…

error2

Sh…

It’s one of those exotic features, which a site does not need at all, but SharePoint has saved the info about it together with the site. But, what coult it be? I vaguely remember that I wrote a code snippet sometime, to iterate all the features, and to search for the problematic one (that is, presume, if you still have the access to the source server).

I of course couldn’t find the code, so I needed to write it again (and I’ll paste it in this post). Basically, a console app which dumps the feature IDs and corresponding display names. And, there it was, my problematic feature, in a Farm scope, with some very close relatives:

Feature id 19f5f68e-1b92-4a02-b04d-61810ead0407 – name ReviewPublishingSPD1031
Feature id 19f5f68e-1b92-4a02-b04d-61810ead0409 – name ReviewPublishingSPD1033
Feature id 19f5f68e-1b92-4a02-b04d-61810ead040c – name ReviewPublishingSPD1036
Feature id 19f5f68e-1b92-4a02-b04d-61810ead041a – name ReviewPublishingSPD1050

Hmmm… Routing Workflows, in different language variants. Yes, I had few llanguage interface packs on the source server, among them there was Croatian. 1050. That’s the one – Routing Workflow for Croatian. OK, I installed the language packs on the destination server as well (French, German, Croatian, Bosnian, Serbian Cyrillic). And then, tried to create the site again…

…boom. Again no luck. OK, let’s try it the SharePoint way: deactivate Workflow feature in the site collection, and reactivate it again. Still doesn’t work. The Croatian routing workflow is still missing (funny enough – the same feature, only in German, French, Bosnian and Serbian didn’t make any troubles).

The only way was to activate the Croatian Routing Workflow feature was with the STSADM. That worked as a charm, and I have finaly created my site.

stsadm -o activatefeature -id 3bc0c1e1-b7d5-4e82-afd7-9f7e59b6041a -url http://sharedove

Summary: you won’t find all of the missing features and its IDs in Google. Especially if you are dealing with some exotic or custom developed features. Furthermore, in a case of locale variant of the Routing Workflow feature, as it was the case here, pure deactivating and reactivating of the Workflow feature “bundle”, on the Site Collection features page, will not help. You will need to identify the exact feature you are missing, and acvtivate it yourself using the STSADM or PowerShell.

The following code snippet (I run it as a command tool on the server) lists all of the features in your farm, site and web scopes, and helps you to identify the problematic ones. For you PowerShell geeks, It should be easy enough to create a PS script based on the same code.

using (SPSite siteCollection = new SPSite("http://enterprisetest/sites/ShareDove"))
{
    using (SPWeb web = siteCollection.OpenWeb())
    {
        Console.WriteLine("Farm Features");
        Console.WriteLine("======================");
        foreach (SPFeatureDefinition featureDefinition in siteCollection.WebApplication.Farm.FeatureDefinitions)
        {
            Console.WriteLine(string.Format("Feature id {0} - name {1} ", featureDefinition.Id, featureDefinition.DisplayName));
        }


        Console.WriteLine("SiteCollection Features");
        Console.WriteLine("======================");
        foreach (SPFeature feature in siteCollection.Features)
        {
            Console.WriteLine(string.Format("Feature id {0} - name {1} ", feature.DefinitionId.ToString(), feature.Definition.DisplayName));
        }


        Console.WriteLine("Site Features");
        Console.WriteLine("======================");
        foreach (SPFeature feature in web.Features)
        {
            Console.WriteLine(string.Format("Feature id {0} - name {1} ", feature.DefinitionId.ToString(), feature.Definition.DisplayName));
        }
        
    }
}

Console.ReadLine();

Previous

Next