2

I have created a custom master page for my sites and am using feature stapling to associate the master page with the personal site once it is provisioned (when a user first clicks the My SIte > My Content Link).

I get the following error, and from what I have read it seems to be related to features missing erroneous features.

Can anyone help please?

Failed to create personal site (amze\AAB0450, http://homedev/personal/aab0450): System.InvalidOperationException: Failed to compare two elements in the array. ---> System.ArgumentNullException: Value cannot be null.  Parameter name: g    
 at System.Guid..ctor(String g)    
 at Microsoft.SharePoint.SPTemplateAssociationElement.ActivationDependencyComparer.System.Collections.Generic.IComparer<Microsoft.SharePoint.SPTemplateAssociationElement>.Compare(SPTemplateAssociationElement tplassoc1, SPTemplateAssociationElement tplassoc2)    
 at System.Collections.Generic.ArraySortHelper`1.QuickSort(T[] keys, Int32 left, Int32 right, IComparer`1 comparer)    
 at System.Collections.Generic.ArraySortHelper`1.Sort(T[] keys, Int32 index, Int32 length, IComparer`1 comparer)     -
 -- End of inner exception stack trace ---    
 at System.Collections.Generic.ArraySortHelper`1.Sort(T[] keys, Int32 index, Int32 length, IComparer`1 comparer)    
 at System.Array.Sort[T](T[] array, Int32 index, Int32 length, IComparer`1 comparer)    
 at System.Collections.Generic.List`1.Sort(Int32 index, Int32 count, IComparer`1 comparer)    
 at System.Collections.Generic.List`1.Sort(IComparer`1 comparer)    
 at Microsoft.SharePoint.SPElementProvider.QueryForSortedElementsJoinOR[TElementType](List`1 dictAttrPatterns, List`1 lstfeatdefFeaturesOfInterest, List`1 listofOptionalElementsToQuery, CultureInfo ciElements, IComparer`1 icmp, Int32 webUIVersion)    
 at Microsoft.SharePoint.SPTemplateAssociationElement.DetermineSiteScopedTemplateAssociations(SPSite site, String sTemplateName)    
 at Microsoft.SharePoint.SPTemplateAssociationElement.EnsureTemplateAssociatedSiteFeaturesActivated(SPSite site, String sTemplateName)    
 at Microsoft.SharePoint.SPFeatureManager.<>c__DisplayClass16.<EnsureTemplateAssociatedSiteFeaturesActivated>b__15()    
 at Microsoft.SharePoint.SPSecurity.RunAsUser(SPUserToken userToken, Boolean bResetContext, WaitCallback code, Object param)    
 at Microsoft.SharePoint.SPFeatureManager.EnsureTemplateAssociatedSiteFeaturesActivated(Byte[]& userToken, Guid& tranLockerId, Int32 nZone, Guid databaseid, Guid siteid, String sTemplateName)    
 at Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, String& bstrWebTemplate, Int32& plWebTemplateId)    
 at Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, String& bstrWebTemplate, Int32& plWebTemplateId)    
 at Microsoft.SharePoint.SPWeb.ApplyWebTemplate(String strWebTemplate)    
 at Microsoft.SharePoint.Administration.SPSiteCollection.Add(SPContentDatabase database, SPSiteSubscription siteSubscription, String siteUrl, String title, String description, UInt32 nLCID, String webTemplate, String ownerLogin, String ownerName, String ownerEmail, String secondaryContactLogin, String secondaryContactName, String secondaryContactEmail, String quotaTemplate, String sscRootWebUrl, Boolean useHostHeaderAsSiteName)    
 at Microsoft.SharePoint.SPSite.SelfServiceCreateSite(String siteUrl, String title, String description, UInt32 nLCID, String webTemplate, String ownerLogin, String ownerName, String ownerEmail, String contactLogin, String contactName, String contactEmail, String quotaTemplate, SPSiteSubscription siteSubscription)    
 at Microsoft.Office.Server.UserProfiles.UserProfile.<>c__DisplayClass5.<CreateSite>b__3().

1 Answer 1

1

There is a Feature admin tool from Codeplex - http://featureadmin.codeplex.com/

It helps you to find faulty FeatureDefinitions and cleanly uninstall them. After that try reinstalling and activating the feature again.

2
  • Thanks for the reply Deepu I have run it against the root site collection (homedev) but it didn't find any faults. Any other ideas?
    – Burt
    Commented Jan 16, 2012 at 12:32
  • Did you try stapling the feature to any other site other than MySite? It would be helpful if you could paste the code for analysis.
    – Deepu Nair
    Commented Jan 16, 2012 at 14:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.