Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

Problem trying to staple publishing features in Personal Site template in Sharepoint 2013

$
0
0

Hi everybody,
Yes, I know, there are a lot of posts about how customize personal sites with feature stapling technique, in fact, this is how I'm trying to add these features to the sites:

<!--Publishing infrastructure--><FeatureSiteTemplateAssociation Id="F6924D36-2FA8-4f0b-B16D-06B7250180FA" TemplateName="SPSPERS#0" /><!-- Publishing web --><FeatureSiteTemplateAssociation Id="94C94CA6-B32F-4da9-A9E3-1F3D343D7ECB" TemplateName="SPSPERS#0" />
 

This works perfectly on sharepoint 2010, but it doesn't work over sharepoint 2013. When sites are created, "Publishing infrastructure" feature is activated, but not the web scope feature.

A workaround I have tried is creating personal sites with a timer job and activating features programatically, but it also doesn't works. 

                        if (item.PersonalSite == null)
                        {
                            item.CreatePersonalSite();
                            using (SPSite site = item.PersonalSite)
                            {
                                //Publishing Infrastructure
                                site.ActivateFeature("{F6924D36-2FA8-4F0B-B16D-06B7250180FA}");

                                using (SPWeb web = site.OpenWeb())
                                {
                                    //Publishing web
                                    web.ActivateFeature("{94C94CA6-B32F-4da9-A9E3-1F3D343D7ECB}");
                                }
                            }
                        }

Has someone try to customize personal sites in Sharepoint 2013? Anybody has a tip about what can be the problem?

Any help will be appreciated :(

Thanks in advance,

Sergio,


Sergio Calleja


Viewing all articles
Browse latest Browse all 25064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>