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

SharePoint 2016 MySite activate branding automatically using feature stapling not working

$
0
0

Hi folks

I'm trying to automatically apply a custom master page and a spocolor file to new mysite site collections as they get created automatically by users clicking the app launch / waffle menu (on "Site" or "OneDrive"). 

It's on prem SharePoint 2016 implementation. My feature activates and works fine if manually activated but I need it to work automatically. 

I followed various tutorials like below which talk about feature stapling and adding a web event receiver

http://frederik.se/how-to-brand-sharepoint-2013-team-sites-using-feature-stapling-in-vs/
https://sharepointologic.blogspot.ca/2013/04/branding-sharepoint-2013-my-sites-with.html

Both of which are very straight forward.

For some reason my branding feature does NOT get activated automatically to mysites site collections as they get created. Personal sites are setup under /personal managed path. So to test is I just delete my /personal/<username> site collection and click on OneDrive or Sites from the waffle menu / app launcher.

I made the feature stapler feature to be farm scoped, web app scoped, NOTHING. I stapled it to the SPSPERS#2 web template which is what's indicated in the tutorials above. It's as if the feature stapling is not picked up by SharePoint.

Did anyone come across this? I'm completely stumped.

I was reading something related to the order of events that take place during site creation. I don't know if that's the cause?

Thanks

PS. I looked thru ULS logs and noticed this (see SPSPERS#10 in bold)

Site collection creation result Succeeded:True;CreateFromSiteMaster:True;EffectiveCreateFromSiteMaster:True;CreatingSiteMaster:False;Template:SPSPERS#10;Description:This is the personal space of LAST NAME, FIRST NAME. You can use this space to create lists, document libraries to store, organize, and share information with others.

My elements file looks like this (I've added all the SPSPERS configs). I tried only one, or a few, or all. Farm scoped, Web app scoped - no luck

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <FeatureSiteTemplateAssociation Id="7f629628-64f4-4066-9451-1aa4b70e33b7" TemplateName="SPSPERS#10" />
  <FeatureSiteTemplateAssociation Id="7f629628-64f4-4066-9451-1aa4b70e33b7" TemplateName="SPSPERS#0" />
  <FeatureSiteTemplateAssociation Id="7f629628-64f4-4066-9451-1aa4b70e33b7" TemplateName="SPSPERS#2" />
  <FeatureSiteTemplateAssociation Id="7f629628-64f4-4066-9451-1aa4b70e33b7" TemplateName="SPSPERS#3" />
  <FeatureSiteTemplateAssociation Id="7f629628-64f4-4066-9451-1aa4b70e33b7" TemplateName="SPSPERS#4" />
  <FeatureSiteTemplateAssociation Id="7f629628-64f4-4066-9451-1aa4b70e33b7" TemplateName="SPSPERS#5" />
  <FeatureSiteTemplateAssociation Id="7f629628-64f4-4066-9451-1aa4b70e33b7" TemplateName="SPSPERS#6" />
  <FeatureSiteTemplateAssociation Id="7f629628-64f4-4066-9451-1aa4b70e33b7" TemplateName="SPSPERS#7" />
  <FeatureSiteTemplateAssociation Id="7f629628-64f4-4066-9451-1aa4b70e33b7" TemplateName="SPSPERS#8" />
  <FeatureSiteTemplateAssociation Id="7f629628-64f4-4066-9451-1aa4b70e33b7" TemplateName="SPSPERS#9" />
  <FeatureSiteTemplateAssociation Id="7f629628-64f4-4066-9451-1aa4b70e33b7" TemplateName="SPSPERS" />
</Elements>




Viewing all articles
Browse latest Browse all 7589

Trending Articles



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