1

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?

1 Answer 1

3

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>
2
  • 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, 2012 at 1:17
  • 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, 2012 at 19:39

Your Answer

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

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