Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a SP 2010 Enterprise/VS 2010 workstation. I have built and deployed a custom master/CSS/asset library for a standard My Site deployment as a feature and modules. The master deploys and functions correctly - it's a bit clunky to have to manually activate the feature each time, but w/e. I can deal with that. The master page feature is scoped at "Site" level.

Because I am also attempting to theme the My Content portion of the My Site portal - which is provisioned after the master page feature activation, I have attempted to use Feature Stapling to force newly provisioned My Content sites to follow the custom master in the according feature. However, this is not occurring. Further, the My Content site does not include the two features I have built in the feature list from /_layouts/ManageFeatures.aspx?Scope=Site. The parent My Site site does.

The Main.Feature Feature Id property matches the Id in the (entirely included) manifest file for the stapling feature below:

<Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <FeatureSiteTemplateAssociation Id="f75480c9-8875-4f12-8358-f8f4441342bd" TemplateName="GLOBAL" /> </Elements>

What is causing the features to fail to inherit? If this is not causing the feature to be activated by the stapling, what is causing the stapling feature to fail to appropriately associate the new master page for the newly provisioned site/where should one look for the appropriate settings to allow this to happen?

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

If you're trying to associate your feature to the MySite, try this, substituting the GUID of the feature you want activated for the Id. This associates the specified feature to the SPSPERS#0 template (MySite).

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <FeatureSiteTemplateAssociation
   Id="f3fce6c7-751d-4009-87df-75564ab6fe4f"
   TemplateName="SPSPERS#0"/>
</Elements>
share|improve this answer
    
The feature is already successfully associated with the My Site collection. I'm trying to troubleshoot why it is not being inherited correctly to the My Content subsite. The GUID I am already using is from the feature I am trying to activate. –  zwerdlds Jun 14 '12 at 18:18
    
When you say "My Content subsite" what are you referring to? There's no subsite per say. Each user's MySite is a dedicated Site Collection built on the SPSPERS#0 template. The newsfeed and profile pages are served from the central MySiteHost (which uses a different template/master), and the profile's "Content" tab is essentially a window into the users actual MySite site collection. –  webdes03 Jun 15 '12 at 1:17
    
By "My Content subsite" I mean the page which is brought up when one clicks on "My Content". I now understand the role of SPSPERS#0 more clearly from your comment, and I'll add the Feature Site Template Association to the stapler in addition to the existing "Global" TemplateName association. I'll get back to you regarding this working - or not. My concerns are: 1) I don't know if the stapling is even working; 2) Shouldn't the "Global" TemplateName association include the SPSPERS#0 template category already? The MySite section of this deployment is a standalone WebApplication –  zwerdlds Jun 18 '12 at 17:03
    
If you're going to reference the GLOBAL#0 template, you have to reference it as GLOBAL#0 not Global. There's a good list here that breaks down all of the template names: sharepointpolice.com/blog/2010/07/09/… –  webdes03 Jun 18 '12 at 19:39
    
Wow! That is super helpful! Thanks much! –  zwerdlds Jun 18 '12 at 21:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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