Friday, September 2, 2011

Possible reason of missing My Site and My Profile links in Sharepoint

Recently I investigated the problem with missing My Site (and My Profile) link in Sharepoint 2010:

image

If you will investigate the issue, the most often causes are:

  • Social Tags and Note Board Ribbon Controls farm scope feature is not activated
  • User profile service application is not associated with web application
  • “Create Personal Site” permission should be granted to the user or group (in Central Administration > Manage service applications > User profile service applications > Manage user permissions)

All of them was ok in my case. I checked internal implementation of My Site link. It is shown with the standard control Welcome.ascx. I said “with”, but not “in” the Welcome.ascx, because it is shown via delegate control with ID=”GlobalSiteLink2” which is not the part of Welcome.ascx. Instead My Site and My Profile links are added on the top of links shown in Welcome.ascx. Exact implementation of the social links is located in SocialData.ascx control (in 14/Templates/ControlTemplates folder). It is added to the site via mentioned SocialRibbonControl feature. Here its elements manifest file SocialDelegateControl.xml:

   1: <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
   2:     <Control Id="GlobalSiteLink3" Sequence="100"
   3:         ControlClass="Microsoft.SharePoint.Portal.WebControls.SocialNotificationControl"
   4:         ControlAssembly="Microsoft.SharePoint.Portal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
   5:     <Control Id="GlobalSiteLink3-mini" Sequence="100"
   6:         ControlClass="Microsoft.SharePoint.Portal.WebControls.SocialNotificationMiniControl"
   7:         ControlAssembly="Microsoft.SharePoint.Portal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
   8:     <Control Id="GlobalSiteLink2" Sequence="100" ControlSrc="~/_controltemplates/socialdata.ascx" />
   9:     <Control Id="GlobalSiteLink2-mini" Sequence="100"
  10:         ControlClass="Microsoft.SharePoint.Portal.WebControls.SocialNavigationControl"
  11:         ControlAssembly="Microsoft.SharePoint.Portal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
  12: </Elements>

If you will investigate standard v4.master page, you will see that delegate control is located near the Welcome.ascx:

   1: <div class="s4-trc-container-menu">
   2:     <div>
   3:        <wssuc:Welcome id="IdWelcome" runat="server" EnableViewState="false">
   4:        </wssuc:Welcome>
   5:        <wssuc:MUISelector ID="IdMuiSelector" runat="server"/>
   6:    </div>
   7: /div>
   8: <SharePoint:DelegateControl ControlId="GlobalSiteLink2" ID="GlobalDelegate2" Scope="Farm" runat="server" />

In turn all these controls are located inside SPRibbon control. In our solution custom master page was used and Welcome.ascx was moved outside the SPRibbon control. But the delegate control was leaved on the previous place inside the ribbon. There was also customization – ribbon was placed inside SPSecurityTrimmedControl in order to hide it for users with Reader permission.

As result users who have only Reader permissions successfully saw Welcome.ascx control, but without My Site and My Profile link. The reason is that ribbon was hidden by SPSecurityTrimmedControl, and delegate control was hidden as part of the ribbon.

In order to fix this bug, I just moved delegate control from the ribbon to under Welcome.asmx (as in standard v4.master). After this My Site and My Profile links became visible for the users with Reader permissions.

3 comments:

  1. Excellent. Thanks for the post. I was banging my head over this problem and your post solved my issue.

    ReplyDelete
  2. thank you! the farm scope feature was it. I don't know if I would have ever looked at tthat.

    ReplyDelete