Geeks With Blogs

Mike H. - Another Geek In Need... WebLog

Between beta 2 and beta 2 TR/RTM - a number of things changed in the MOSS master pages/CSS - and the odds are that if you have custom master pages in B2, and especially if you customized the TopNavFlyouts or LeftNavFlyouts master pages - after applying TR or RTM - you'll find that your master page is broke - and the site will not come up. Do not despair - help is close at hand!!! A number of things changed in B2TR and followed into RTM. We can make some minor customizations to your current master page (TopNavFlyouts in this example) that will get it back up and running.

After applying the upgrade - ensure that you have a updated copy of the SharePoint Designer (SPD). Open your site, and fetch the master page in question (TopNavFlyouts in this example).

Get there where we can render the page...

First, search for <PublishingNavigation:PortalSiteMapDataSource> - the control with id=DataMapDS. Once you find this, replace the TrimNonCurrentHeadings="true" property with TrimNonCurrentTypes="Heading".

Second, search for and replace

<SharePoint:ScriptLink language="javascript" name="core.js" runat="server"/>

<SharePoint:ScriptLink language="javascript" name="ows.js" runat="server" />

with

<SharePoint:ScriptLink language="javascript" name="init.js" runat="server"/>

If you try saving right now? You might see:

If this does not render - it is a prompt stating that you need to add a new placeholder for the Robots meta tag - go ahead and click Yes.

Third, You can click Yes above, or add the following just after the <meta> tags in your master page - <SharePoint:RobotsMetaTag runat="server"></SharePoint:RobotsMetaTag>

NOTE: This must be added after the <meta> tags, and before the </head> end tag.

 

There is a snafu now - which you would notice if you tried rendering now - with the toolbar rendering where we want it. Do the following:

Fouth, locate the class="mainContainer" line. Add id="MSO_ContentDiv" runat="server" in this line. The corrected line should look like:

<div class="mainContainer" id="MSO_ContentDiv" runat="server">

Fifth, search for the following in your master page:

 

<div class="search">
<asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server">
<SPSWC:RightBodySectionSearchBox id="SearchBox" TextBeforeDropDown="" TextBeforeTextBox="<%$Resources:cms,masterpages_searchbox_label%>" TextBoxWidth="100" GoImageUrl="<% $SPUrl:~sitecollection/Style Library/Images/Search_Arrow.jpg %>"
GoImageUrlRTL="<% $SPUrl:~sitecollection/Style Library/Images/Search_Arrow_RTL.jpg %>" SearchResultPageURL="<% $SPUrl:~sitecollection/SearchResults.aspx %>" DropDownMode = HideScopeDD FrameType="None" runat="server" WebPart="true" __WebPartId="{7872FDA4-AEF7-4DB0-8C99-648EE4441DC8}"/>
</asp:ContentPlaceHolder>
</div>

We want to replace the <SPSWC... /> area with the following:

<SPSWC:SearchBoxEx id="SearchBox" RegisterStyles="false" TextBeforeDropDown="" TextBeforeTextBox="<%$Resources:cms,masterpages_searchbox_label%>" TextBoxWidth="100"
GoImageUrl="<% $SPUrl:~sitecollection/Style Library/Images/Search_Arrow.jpg %>"
GoImageUrlRTL="<% $SPUrl:~sitecollection/Style Library/Images/Search_Arrow_RTL.jpg %>"
GoImageActiveUrl="<% SPUrl:~sitecollection/Style Library/Images/Search_Arrow.jpg %>"
GoImageActiveUrlRTL="<% SPUrl:~sitecollection/Style Library/Images/Search_Arrow_RTL.jpg %>" UseSiteDefaults="true" DropDownMode = "HideScopeDD" SuppressWebPartChrome="true" runat="server" />

The finished line should match:

<div class="search">
<asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server">
<SPSWC:SearchBoxEx id="SearchBox" RegisterStyles="false" TextBeforeDropDown="" TextBeforeTextBox="<%$Resources:cms,masterpages_searchbox_label%>" TextBoxWidth="100"
GoImageUrl="<% $SPUrl:~sitecollection/Style Library/Images/Search_Arrow.jpg %>"
GoImageUrlRTL="<% $SPUrl:~sitecollection/Style Library/Images/Search_Arrow_RTL.jpg %>"
GoImageActiveUrl="<% SPUrl:~sitecollection/Style Library/Images/Search_Arrow.jpg %>"
GoImageActiveUrlRTL="<% SPUrl:~sitecollection/Style Library/Images/Search_Arrow_RTL.jpg %>" UseSiteDefaults="true" DropDownMode = "HideScopeDD" SuppressWebPartChrome="true" runat="server" />
</asp:ContentPlaceHolder>
</div>

Almost done..

Sixth, we need to make some changes to your CSS. In our case, we often override the TopNavFlyouts.css object with one of our own. Whichever the case is for you, you'll need to make the following replacements in your primary CSS for the search control:

 

.search
{
margin:6px 2px 20px 2px;
}
.search .ms-sbcell .ms-sbplain
{
margin-right:2px;
margin-left:2px;
border:1px #555555 solid;
height:14px;
}
.search .ms-sbcell
{
border:none;
font-weight:normal;
font-size:8pt;
color: #3A4663;
padding:0px;
}
.search .ms-sbgo
{
background:none;
}

This involves adding the 'margin: 6px, etc.' line to your existing .Search class, and adding the other 3 new classes.

Now - one more thing. The TopNavFlyouts.master is a given master page in the Internet Presence Web Site site definition - but it has been deprecated. With that said, we need to make a couple more changes - so our Publishing Portal (or other custom) site definition can see the master page.

1) Browse the site in question that you have the TopNavFlyouts master page in.

2) Site Actions-->Manage Content and Structure

3) Select the Master Page Gallery on the left.

4) Locate your TopNavFlyouts.master on the right side

5) Hover over and get your drop down menu - click and Check Out the master page - if it is not already

6) Hover over again, click and Edit Properties

7) On the Edit Item - Master Page Gallery: TopNavFlyouts screen, notice the Content Type is set to Master Page. Drop this down and change it to Publishing Master Page.

8) Notice now that a Hidden Page attribute/property just appeared at the bottom of the properties screen. Un-check that - we do not want it hidden.

9) Click OK

10) Publish the new page.

That's it!!!

You may have other modifications to make - but this should get your page to where it renders and is compliant with new MOSS controls.

Enjoy :)

Posted on Friday, December 29, 2006 4:37 PM Microsoft Office SharePoint Server 2007 (MOSS) | Back to top


Comments on this post: Microsoft SharePoint Office Server (MOSS) 2007 B2TR and RTM - Deprecated TopNavFlyouts master page and other deprecated components that break your master page after applying these upgrades

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Michael J. Hamilton, Sr. | Powered by: GeeksWithBlogs.net