Home » Sharepoint 2010RSS

v4.master: Internet Explorer loses scrollbar unless user authenticates

I am somewhat new to Sharepoint, and used a spsecuritytrimmedcontrol for anonymous users.  However, when I log in as anonymous, I lose the scrollbar in IE.  Once I authenticate as someone, I have the scroll bar back.

I have scroll=no on the page (default).  If I change this to Yes, I do have an anonymous scrollbar, but once authenticating, it creates a second scrollbar for the authenticated user.

Here is the offending code - can someone point me in the right direction (my guess is the menuitemtemplates are not the offending code, but wanted to throw in the whole block)...

================================================

<SharePoint:SPSecurityTrimmedControl PermissionsString="ManagePermissions" runat="server">
<div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle">
 <div id="s4-ribboncont">
  <SharePoint:SPRibbon
   runat="server"
   PlaceholderElementId="RibbonContainer"
   CssFile="">
   <SharePoint:SPRibbonPeripheralContent
    runat="server"
    Location="TabRowLeft"
    CssClass="ms-siteactionscontainer s4-notdlg">
        <span class="ms-siteactionsmenu" id="siteactiontd">
<!--        <SharePoint:SPSecurityTrimmedControl ID = "spstcSiteActions" runat = "server" PermissionsString = "ManageWeb" > -->
        <SharePoint:SiteActions runat="server" accesskey="<%$Resources:wss,tb_SiteActions_AK%>" id="SiteActionsMenuMain"
      PrefixHtml=""
      SuffixHtml=""
      MenuNotVisibleHtml="&amp;nbsp;"
      >
      <CustomTemplate>
      <SharePoint:FeatureMenuTemplate runat="server"
       FeatureScope="Site"
       Location="Microsoft.SharePoint.StandardMenu"
       GroupId="SiteActions"
       UseShortId="true"
       >
       <SharePoint:MenuItemTemplate runat="server" id="MenuItem_EditPage"
        Text="<%$Resources:wss,siteactions_editpage%>"
        Description="<%$Resources:wss,siteactions_editpagedescriptionv4%>"
        ImageUrl="/_layouts/images/ActionsEditPage.png"
        MenuGroupId="100"
        Sequence="110"
        ClientOnClickNavigateUrl="javascript:ChangeLayoutMode(false);"
        />
       <SharePoint:MenuItemTemplate runat="server" id="MenuItem_TakeOffline"
        Text="<%$Resources:wss,siteactions_takeoffline%>"
        Description="<%$Resources:wss,siteactions_takeofflinedescription%>"
        ImageUrl="/_layouts/images/connecttospworkspace32.png"
        MenuGroupId="100"
        Sequence="120"
        />
       <SharePoint:MenuItemTemplate runat="server" id="MenuItem_CreatePage"
        Text="<%$Resources:wss,siteactions_createpage%>"
        Description="<%$Resources:wss,siteactions_createpagedesc%>"
        ImageUrl="/_layouts/images/NewContentPageHH.png"
        MenuGroupId="200"
        Sequence="210"
        UseShortId="true"
        ClientOnClickScriptContainingPrefixedUrl="if (LaunchCreateHandler('Page')) { OpenCreateWebPageDialog('~site/_layouts/createwebpage.aspx') }"
        PermissionsString="AddListItems, EditListItems"
        PermissionMode="All" />
       <SharePoint:MenuItemTemplate runat="server" id="MenuItem_CreateDocLib"
        Text="<%$Resources:wss,siteactions_createdoclib%>"
        Description="<%$Resources:wss,siteactions_createdoclibdesc%>"
        ImageUrl="/_layouts/images/NewDocLibHH.png"
        MenuGroupId="200"
        Sequence="220"
        UseShortId="true"
        ClientOnClickScriptContainingPrefixedUrl="if (LaunchCreateHandler('DocLib')) { GoToPage('~site/_layouts/new.aspx?FeatureId={00bfea71-e717-4e80-aa17-d0c71b360101}&amp;ListTemplate=101') }"
        PermissionsString="ManageLists"
        PermissionMode="Any"
        VisibilityFeatureId="00BFEA71-E717-4E80-AA17-D0C71B360101" />
       <SharePoint:MenuItemTemplate runat="server" id="MenuItem_CreateSite"
        Text="<%$Resources:wss,siteactions_createsite%>"
        Description="<%$Resources:wss,siteactions_createsitedesc%>"
        ImageUrl="/_layouts/images/newweb32.png"
        MenuGroupId="200"
        Sequence="230"
        UseShortId="true"
        ClientOnClickScriptContainingPrefixedUrl="if (LaunchCreateHandler('Site')) { STSNavigate('~site/_layouts/newsbweb.aspx') }"
        PermissionsString="ManageSubwebs,ViewFormPages"
        PermissionMode="All" />
       <SharePoint:MenuItemTemplate runat="server" id="MenuItem_Create"
        Text="<%$Resources:wss,siteactions_create%>"
        Description="<%$Resources:wss,siteactions_createdesc%>"
        MenuGroupId="200"
        Sequence="240"
        UseShortId="true"
        ClientOnClickScriptContainingPrefixedUrl="if (LaunchCreateHandler('All')) { STSNavigate('~site/_layouts/create.aspx') }"
        PermissionsString="ManageLists, ManageSubwebs"
        PermissionMode="Any" />
       <SharePoint:MenuItemTemplate runat="server" id="MenuItem_ViewAllSiteContents"
        Text="<%$Resources:wss,quiklnch_allcontent%>"
        Description="<%$Resources:wss,siteactions_allcontentdescription%>"
        ImageUrl="/_layouts/images/allcontent32.png"
        MenuGroupId="300"
        Sequence="302"
        UseShortId="true"
        ClientOnClickNavigateUrl="~site/_layouts/viewlsts.aspx"
        PermissionsString="ViewFormPages"
        PermissionMode="Any" />
        <SharePoint:MenuItemTemplate runat="server" id="MenuItem_EditSite"
        Text="<%$Resources:wss,siteactions_editsite%>"
        Description="<%$Resources:wss,siteactions_editsitedescription%>"
        ImageUrl="/_layouts/images/SharePointDesigner32.png"
        MenuGroupId="300"
        Sequence="304"
        UseShortId="true"
        ClientOnClickScriptContainingPrefixedUrl="EditInSPD('~site/',true);"
        PermissionsString="AddAndCustomizePages"
        PermissionMode="Any"
       />
       <SharePoint:MenuItemTemplate runat="server" id="MenuItem_SitePermissions"
        Text="<%$Resources:wss,people_sitepermissions%>"
        Description="<%$Resources:wss,siteactions_sitepermissiondescriptionv4%>"
        ImageUrl="/_layouts/images/Permissions32.png"
        MenuGroupId="300"
        Sequence="310"
        UseShortId="true"
        ClientOnClickNavigateUrl="~site/_layouts/user.aspx"
        PermissionsString="EnumeratePermissions"
        PermissionMode="Any" />
       <SharePoint:MenuItemTemplate runat="server" id="MenuItem_Settings"
        Text="<%$Resources:wss,settings_pagetitle%>"
        Description="<%$Resources:wss,siteactions_sitesettingsdescriptionv4%>"
        ImageUrl="/_layouts/images/settingsIcon.png"
        MenuGroupId="300"
        Sequence="320"
        UseShortId="true"
        ClientOnClickNavigateUrl="~site/_layouts/settings.aspx"
        PermissionsString="EnumeratePermissions,ManageWeb,ManageSubwebs,AddAndCustomizePages,ApplyThemeAndBorder,ManageAlerts,ManageLists,ViewUsageData"
        PermissionMode="Any" />
       <SharePoint:MenuItemTemplate runat="server" id="MenuItem_CommitNewUI"
        Text="<%$Resources:wss,siteactions_commitnewui%>"
        Description="<%$Resources:wss,siteactions_commitnewuidescription%>"
        ImageUrl="/_layouts/images/visualupgradehh.png"
        MenuGroupId="300"
        Sequence="330"
        UseShortId="true"
        ClientOnClickScriptContainingPrefixedUrl="GoToPage('~site/_layouts/prjsetng.aspx')"
        PermissionsString="ManageWeb"
        PermissionMode="Any"
        ShowOnlyIfUIVersionConfigurationEnabled="true" />
      </SharePoint:FeatureMenuTemplate>
      </CustomTemplate>
       </SharePoint:SiteActions></span>
       <!--</SharePoint:SPSecurityTrimmedControl>-->
      
    <asp:ContentPlaceHolder id="PlaceHolderGlobalNavigation" runat="server">
      <SharePoint:PopoutMenu
       runat="server"
       ID="GlobalBreadCrumbNavPopout"
       IconUrl="/_layouts/images/fgimg.png"
       IconAlt="<%$Resources:wss,master_breadcrumbIconAlt%>"
       IconOffsetX=0
       IconOffsetY=112
       IconWidth=16
       IconHeight=16
       AnchorCss="s4-breadcrumb-anchor"
       AnchorOpenCss="s4-breadcrumb-anchor-open"
       MenuCss="s4-breadcrumb-menu">
       <div class="s4-breadcrumb-top">
        <asp:Label runat="server" CssClass="s4-breadcrumb-header" Text="<%$Resources:wss,master_breadcrumbHeader%>" />
       </div>
       <asp:ContentPlaceHolder id="PlaceHolderTitleBreadcrumb" runat="server">
        <SharePoint:ListSiteMapPath
         runat="server"
         SiteMapProviders="SPSiteMapProvider,SPContentMapProvider"
         RenderCurrentNodeAsLink="false"
         PathSeparator=""
         CssClass="s4-breadcrumb"
         NodeStyle-CssClass="s4-breadcrumbNode"
         CurrentNodeStyle-CssClass="s4-breadcrumbCurrentNode"
         RootNodeStyle-CssClass="s4-breadcrumbRootNode"
         NodeImageOffsetX=0
         NodeImageOffsetY=353
         NodeImageWidth=16
         NodeImageHeight=16
         NodeImageUrl="/_layouts/images/fgimg.png"
         RTLNodeImageOffsetX=0
         RTLNodeImageOffsetY=376
         RTLNodeImageWidth=16
         RTLNodeImageHeight=16
         RTLNodeImageUrl="/_layouts/images/fgimg.png"
         HideInteriorRootNodes="true"
         SkipLinkText="" />
        </asp:ContentPlaceHolder>
      </SharePoint:PopoutMenu>
      <div class="s4-die">
       <asp:ContentPlaceHolder id="PlaceHolderGlobalNavigationSiteMap" runat="server" Visible="false">
       </asp:ContentPlaceHolder>
      </div>
    </asp:ContentPlaceHolder>
    <SharePoint:PageStateActionButton id="PageStateActionButton" runat="server" Visible="false" />
   </SharePoint:SPRibbonPeripheralContent>
   <SharePoint:SPRibbonPeripheralContent
    runat="server"
    Location="TabRowRight"
    ID="RibbonTabRowRight"
    CssClass="s4-trc-container s4-notdlg">
 <SharePoint:DelegateControl runat="server" ID="GlobalDelegate0" ControlId="GlobalSiteLink0" />
  <a href="#" tabindex="-1" style="display:none"></a><a href="#" tabindex="-1" style="display:none"></a>
  <div class="s4-trc-container-menu">
   <div>
   <wssuc:MUISelector ID="IdMuiSelector" runat="server"/>
  </div>
 </div>
 <SharePoint:DelegateControl ControlId="GlobalSiteLink2" ID="GlobalDelegate2" Scope="Farm" runat="server" />
 <span>
  <span class="s4-devdashboard">
   <Sharepoint:DeveloperDashboardLauncher
    ID="DeveloperDashboardLauncher"
    NavigateUrl="javascript:ToggleDeveloperDashboard()"
    runat="server"
    ImageUrl="/_layouts/images/fgimg.png"
    Text="<%$Resources:wss,multipages_launchdevdashalt_text%>"
    OffsetX=0
    OffsetY=222
    Height=16
    Width=16 />
  </span>
 </span>
   </SharePoint:SPRibbonPeripheralContent>
  </SharePoint:SPRibbon>
 </div>
 <div id="notificationArea" class="s4-noti">
 </div>
 <asp:ContentPlaceHolder ID="SPNavigation" runat="server">
   <SharePoint:DelegateControl runat="server" ControlId="PublishingConsole" Id="PublishingConsoleDelegate">
     </SharePoint:DelegateControl>
 </asp:ContentPlaceHolder>
 <div id="WebPartAdderUpdatePanelContainer">
  <asp:UpdatePanel
   ID="WebPartAdderUpdatePanel"
   UpdateMode="Conditional"
   ChildrenAsTriggers="false"
   runat="server">
   <ContentTemplate>
    <WebPartPages:WebPartAdder ID="WebPartAdder" runat="server" />
   </ContentTemplate>
   <Triggers>
    <asp:PostBackTrigger ControlID="WebPartAdder" />
   </Triggers>
  </asp:UpdatePanel>
 </div>
</div>
</SharePoint:SPSecurityTrimmedControl>

 

3 Answers Found

 

Answer 1

The ribbon exposed is meant to work with the first two Divs in the master  page - that help with the scroll  bar.  So that you can hide the ribbon and have the scroll on your page  you have to remove the first two divs on your master page, the #s4-workspace and the #s4-bodycontainer - if you just remove the ID's that will be fine.

I will have to look back  at the exact changes you need to make but - you also remove the scroll="no" from the body tag.  Then you have some CSS changes to make.

I did that on a site and while it works. I regret doing so.  When you edit your page you are left with scrolling up and down the page to view the ribbon and edit the page.

Give those first two items a try and see if that starts working for you. Meanwhile I will look back to view the changes I made and post them.

Thanks

Heather

 

Answer 2

Heather,

Thank you for your reply.  I did wrap a spsecuritytrimmedcontrol  around the 2 items you had mentioned and the body of the page  disappeared.  I have to warn you I am new to Sharepoint, but by removing the spsecuritytrimmedcontrol (in the original email) the page does work correctly.  This is just the basic v4.master that came installed with the site.

Like I mentioned before, I did set scroll=yes to the page, and I did have a scrollbar  for anonymous  users.  Unfortunately, when a user  authenticated, it displayed a second scrollbar (and disabled the other).

Kind of strange?

 

Answer 3

Looks as though the answer was in the placing of the spsecuritytrimmed control after all.  Made sense, since removing the control fixed the issue (of only the scrollbar  disappearing).

The placement was to the left of the control, whereas it should have been inside.  This change  of placement allowed the scrollbar to appear, while hiding the ribbon controls from anonymous  users.

 
 
 

<< Previous      Next >>


Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter