Thursday, February 17, 2011

How to fix SharePoint 2010 email enabled list no longer receive incoming emails issue after upgrade from 2007

SharePoint provides a great feature that a site owner can enable and configure incoming e-mail support for the following list or library: 
  • Document, picture, or form library
  • Announcements list
  • Calendar list
  • Discussion board
  • Blog
You could refer Microsoft site for more details how you could enable this on SharePoint. After upgrading SharePoint from 2007 to 2010, the first issue we identified is email enabled list no longer receive emails.This has been identified as SharePoint 2010 upgrade bug. After two days research we identified the procedures how to fix it to share.

 To resolve the issue, navigate to the settings for the library and click on the Incoming e-mail settings.

Since the site was upgraded, the current setting should be YES and the email address defined.  Change "Allow this document library to receive e-mail" to No and click Save.  Next, click Incoming E-mail Settings again and set "Allow this document library to receive e-mail" to Yes and click Save again.You could refer one useful blog for details.




Now the real challenge is to identify all the emailed enabled lists so we could fix them immediately. I looked at the SharePoint database and found we could use direct database query to identify those lists. Here is the one we used August 2010 after we upgraded the SharePoint.



SELECT Webs.FullUrl, AllLists.tp_Title, AllLists.tp_EmailAlias
FROM AllLists
Inner join webs on AllLists.tp_WebID = Webs.Id
where AllLists.tp_EmailAlias is not null

You can run this script against each content DB to report all email enabled lists. The formats return will look like as below:

FullURL            Title                                                   eMailAlias 
it/EA/SSAT       Jive Development Process                  jivedevdoc

The URL is not full URL and you need to pre-append the webapp url like http://<servername or webapp alias>/. You could enhance the script to display the full URL so it will be easier to identify the site.

We also worked with one DBA from Microsoft to provide the script to query all content DB and report all email enabled list inside the whole farm. Due to the urgency of the issue, we used the previous script to query each content DB and have not tested the script named All-List-EmailEnabled-2010.sql.

The script assumes that the config database is called SharePoint_Config so if it is named differently please have the DBA update the script. Since this script is much more complex and creates a temporary table in SQL, please have your DBA review it first in case there are any questions. As usual please test in a dev/test environment first. This does make some additions to the SQL instance, it creates a table, or if run multiple times, it will drop the old version of the table and create a new one. Usually for things like this, I recommend doing SQL backups first as anything that touches SQL can always have the potential to cause issues. 

if exists (select name from sysobjects where name = 'sp_tempDBlist2010')
drop procedure sp_tempdblist2010
go
CREATE PROCEDURE sp_tempdblist2010 @ConfigDB varchar(128)
AS
BEGIN
If Exists (select name from sys.objects where name = 'TempDBlist')
EXECUTE ('drop table '+'['+@ConfigDB+']'+'.dbo.TempDbList')
DECLARE @ts1 varchar(1000)
SET @ts1 = 'create table '+'['+@ConfigDB+']'+'.dbo.TempDbList
(
DBname varchar(128),
WebApp varchar(128),
DBInstance varchar(128),
DBServer varchar(128)
)
Insert into '+'['+@ConfigDB+']'+'.dbo.TempDbList

select distinct o.name as ''DBName'',
w.name as ''WebApp'',
b.name as ''DBInstance'',
c.name as ''DBServer''
from SiteMap as s
inner join '+'['+@ConfigDB+']'+'.dbo.Objects as o with (nolock) on s.DatabaseId = o.Id
inner join '+'['+@ConfigDB+']'+'.dbo.Objects as w with (nolock) on s.ApplicationId = w.Id
inner join '+'['+@ConfigDB+']'+'.dbo.Objects as b with (nolock) on o.ParentId = b.Id
inner join '+'['+@ConfigDB+']'+'.dbo.Objects as c with (nolock) on b.ParentId = c.Id
where w.Name not like '''''
EXEC (@ts1)
If Exists (select name from sys.objects where name = 'TempSiteList')
EXECUTE ('drop table '+'['+@ConfigDB+']'+'.dbo.TempSiteList')
DECLARE @ts2 varchar(1000)
SET @ts2 = 'create table '+'['+@ConfigDB+']'+'.dbo.TempSiteList
(
SiteID varchar(260),
SiteURL varchar(260),
EmailAlias varchar(260)
)'
EXEC (@ts2)

DECLARE @eTDBL varchar (400)
DECLARE @eTUCDB varchar(400)
SET @eTDBL = 'DECLARE DB_cursor CURSOR
                FOR
                select DBServer, DBInstance, DBName, WebApp
                from '+'['+@ConfigDB+']'+'.dbo.TempDbList'
EXECUTE (@eTDBL)
OPEN DB_Cursor
DECLARE @vDBServer varchar(128)
DECLARE @vDBInstance varchar(128)
DECLARE @vDBName varchar(128)
DECLARE @vWebApp varchar(128)
FETCH NEXT FROM DB_cursor INTO @vDBServer, @vDBInstance, @vDBName, @vWebApp
WHILE @@FETCH_STATUS = 0
    BEGIN
    DECLARE @DBv1 varchar(8000)
    DECLARE @slash varchar(128)
    IF @vDBInstance = ''
        SET @slash = ''
    ELSE
        SET @slash = '\'
    SET @DBv1 = '
Insert into '+'['+@ConfigDB+']'+'.dbo.TempSiteList
select w.SiteID, ''<RootFQDN>''+w.fullurl +''/''+ al.tp_title as SiteURL,
al.tp_emailalias as EmailAlias from ['+@vDBServer+@slash+@vDBInstance+'].['+@vDBName+'].dbo.alllists as al with (nolock)
    inner join ['+@vDBServer+@slash+@vDBInstance+'].['+@vDBName+'].dbo.webs as w with (NOLOCK) on w.id = al.tp_webid
    where al.tp_emailalias is not NULL
'
    exec (@DBv1)
FETCH NEXT FROM DB_cursor INTO @vDBServer, @vDBInstance, @vDBName, @vWebApp
END
CLOSE DB_cursor
DEALLOCATE DB_Cursor

select top 20
o.Name as 'DB Name',
Objects.Name as 'Web App',
SiteUrl,
EmailAlias
from TempSiteList
inner join SiteMap with (nolock) on SiteMap.Id = tempsitelist.SiteId
inner join Objects with (nolock) on Objects.Id = SiteMap.ApplicationId
left join Objects as o with (nolock) on SiteMap.DatabaseId = o.Id
group by o.name, Objects.Name, SiteUrl, EmailAlias
--order by siteurl desc

Drop table TempSiteList
Drop table TempDBList
END
go
sp_tempdblist2010 Sharepoint_Config

The second possible query is to query the configuration database to get the email enabled list. You will need to join the site ID, list ID with other tables in order to get meaningful information. Here is the query.


SELECT *
FROM [EmailEnabledLists]


The result for one item looks like:

Alias                       SiteId                                                                                    WebId                                                                                  ListId                                                                     Deleted
harrycqa              A929944E-BE7A-4BB1-96A7-F2F732070036            C19456BA-AE65-415A-8451-DFA75FFAFAD7         51E50914-9399-4B7F-A3C3-E2258B4015E1 0


There is one more possibility to write a C# program using SharePoint object model to identify email enabled lists and fix them. I just published another blog to further enhance the fix after we upgraded SharePoint 2010 RTM version to SP1 + June CU. You could take a look in another blog.

At this time, you understand the email enabled lists issues during SharePoint upgrade. You have the way to identify all those lists and fix them quickly.

 

Tuesday, February 15, 2011

Automatic adding SharePoint 2010 and your own cmdlets to PowerShell ISE

As SharePoint development team, we are starting to write and run more completed Powershell scripts for several major projects such as SharePoint ADFS conversion from window authentication. We are also developed a mass update cmdlets framework to update SharePoint sites. We will need to debug the scripts frequently and identify some intermediate result. PowerShell ISE is the best tool that allow us to set breaking point for debugging. However, there are two problems that is always confused by the team members here.

  1. SharePoint or your customized snap-in do not load automatically when you start PowerShell ISE. You have to add those manually every time when you have new instance.
  2. There are several places you could add the PowerShell profile to add SharePoint 2010 and your own cmdlets automatically. However the scope and location of those scripts are different and difficult to remember when there is an issue.
This blog is to summarize the ways to automatic adding SharePoint 2010 and your own cmdlets to PowerShell ISE for my team.

Before you setup this on SharePoint side, you should understand the scope of the profile for Powershell. Here is the location you could setup the profile that will automatic adding SharePoint 2010 and your own cmdlets to PowerShell ISE.  The profiles ate listed in precedence order and the first profile has the highest precedence.
Description                Path
   -----------                ----
   Current User, Current Host $Home\[My ]Documents\WindowsPowerShell\Profile.ps1
   Current User, All Hosts    $Home\[My ]Documents\Profile.ps1
   All Users, Current Host    $PsHome\Microsoft.PowerShell_profile.ps1
   All Users, All Hosts       $PsHome\Profile.ps1

 Here are the profile locations for my SharePoint server.
  • C:\Windows\System32\WindowsPowerShell\v1.0\profile.ps1
  • C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\profile.ps1
At this time, you understand the different scope of the profile that could be used to automatic add SharePoint 2010 and your own cmdlets to PowerShell ISE. You should use the following command to setup the profile. I would use one example to setup for all users and all host that listed in one blog with some modification.

Open Powershell ISE from Programs->Accessories->PowerShell folder
a. Run the following code from the immediate window in ISE to create a new profile for all users on all hosts. You could change it easily based on the different syntax to create the profile. You should change the other variables in the other commands accordingly.

if (!(test-path $profile.AllUsersAllHosts))
{new-item -type file -path $profile.AllUsersAllHosts-force}

b. Run the following code to edit the new profile

psEdit $profile.AllUsersAllHosts

C. When profile1.ps1 opens, add the following code to attach the SharePoint snap-in every time PowerShell is run.

 If ((Get-PSSnapIn -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null )
{ Add-PSSnapIn -Name Microsoft.SharePoint.PowerShell }
{ Add-PSSnapIn QualcommCMDLETs }  /* this is customized cmdlets */

d.  Save profile.ps1 and close PowerShell ISE.
e. You should see the following file craeted C:\Windows\System32\WindowsPowerShell\v1.0\profile.ps1
f. Start PowerShell ISE again and type the following command to verify that the SharePoint snap-in loaded. You should see SharePoint-specific command listed.

Get-Command Get-SP*

You may noticed one warning if you launch the SharePoint 2010 Management Shell from Programs->Microsoft SharePoint 2010 Products->SharePoint 2010 Management Shell indicates some snap-in already added. This is because SharePoint 2010 Management Shell already added the SharePoint snap-in already. You could ignore this warning message and enjoy the PowerShell ISE with all the SharePoint commends and your own cmdlits from now.

Monday, February 14, 2011

Failed to start macro ‘VerifyUsers’ and ‘Unexpected error occurred while running macro’ for SharePoint 2010 “Projects Web Database” site

We have identified an strange error when we create the SharePoint 2010 “Projects Web Database” site and create new projects on existing “Projects Web Database” site. Basically, there are two issues identified.

      1. Failed to start macro ‘VerifyUsers’ when creating new SharePoint 2010 “Projects Web Database” site. Here are the steps to reproduce.

          a.  Click Site Actions and More Options ...
          b.  Select “Projects Web Database”template and give the name and click create
          c.  You may get the error as in below picture



      2. ‘Unexpected error occurred while running macro’ when adding new projects on SharePoint 2010 “Projects Web Database” site. Here are the steps to reproduce.

           a.  Click the Open Projects tab on the site and enter the name for the project
           b.  Click the Save & New button
           c. You may get the following error






There are three items that we finally understand we know of that could be causing this behavior.

  1. Insufficient Permissions
  2. Dependent Services not enabled
  3. Macro not correctly converted into workflows when the site was provisioned
So to go into a bit more detail, if the access services app does not have sufficient permissions this can happen. But the more common scenario is that either the Microsoft SharePoint Foundation Web Application service is not started on the App server hosting the Access Services, or that the macros from the access DB did not get converted into workflows when the site was provisioned. In order to best determine which issue may be occurring here, the following should be done:

Set Logging levels for Access Services, Excel Services and SharePoint Foundation > Workflow Infrastructure to verbose and reproduce the error. Once we get the logs from this we will be able to figure out which of the above is the case. If the issue is permissions we should get an error message stating this.
 
If it is the second issue, we should simply be able to enable the Microsoft SharePoint Foundation Web Application Service on the App server. This normally happens if you have three tier architecture with IIS as front end web servers to host web access, application servers to host services, and database servers for data. The applications normally runs Excel Services but do not need the Microsoft SharePoint Foundation Web Application Service. However, Microsoft has a bug that there is a dependence that Microsoft SharePoint Foundation Web Application Service is required for Excel Service. If this service is not running, we will see the errors listed above.

The procedure for the second issue in to start 'Microsoft SharePoint Foundation Web Application' on the application servers running 'Access Database Service'.You could do this from central admin or powershell. The interesting part is even you stop the Microsoft SharePoint Foundation Web Application Service later, you will still be able to use the “Projects Web Database”. The issues explained by Microsoft is the service is reading some configuration from web.config file.

In our case, we have web tier for IIS and app server tier for app server so we are able to follow th rpocedure to fix this. However, we were not able to start the service correctly, we had to use the below steps to stop the service

Get all the service instance id numbers
  Get-SPServiceInstance
Find item in provisioning status
Microsoft SharePoint Foundati... Provi... 5fbbed46-2ae9-4965-b00f-d5d899c574bd
 
Stop the MS SP Foundation item found above
 Stop-SPServiceInstance -identity 5fbbed46-2ae9-4965-b00f-d5d899c574bd



 If it is the third issue, we have a powershell script that we can run that will be published later.

SharePoint Web Analytics Service insight part II – Reports deep explore and issues

After you setup the SharePoint 2010 Web Analytics as described in previous blog SharePoint 2010 Web Analytics Service insight part I - Planning and Configuration, you may enjoy reading all different reports now. Most of the reports are straight forward and users can understand without any instructions.  However, some of the reports are difficult to explain and some of them have some issues. It will worth while to drive deeper in some of those reports and share some of the issues identified.


  1. Deep drive on some of the reports 
Among all Web Analytics reports, search reports are the most complicated reports to configure and explain. Let’s looked at the “Failed Queries” report as example in Search category as below. This report is missing leading since it does not display the query actually failed. Here is the way to read this report. You will noticed the “Percentage Abandoned” column. The most interesting value is less than 100% which means users did not click any links in the search result page NOT search failed.

The next "Best Bet" reports will display the search queries users conducted with the best bet URL users have setup. The two columns with "Best Bet Clickthrough" and "Percentage of Best Bet Clickthrough" are somehow difficult for me to explain. If you look at the report below, we are not sure why the number of Queries is 5 for the first entry, but the Best Bet Clickthrough is 11 that is much higher than the queries. The
Percentage of Best Bet Clickthrough is 57.89% that means some users do not click the Best Bet URLs after the search? If you know how to explain these reports, please let me know.




In order to get a"good" result on the Best Bet suggestions, you would need to setup the search keywords with suggestions as the screen shot below. Please refer the previous blog for reference how to setup. The search result will display the "Best Bet" as in the below screen shot if you have added this web part on the search result page.





Another report we are not sure how to explain is "Top Site Product Versions" report under Inventory. There is a column called "Site Product Version". In our case, we have 4 as the value as displayed in the below picture. We are not sure whether this is related to v4 master page on 2010. We are researching to figure at this time.



        2. Issues related to Web Analytics reports

The first mystery to us is some site collection reports such as "Top Pages" is missing "Custom Report" button on the ribbon. We have identified this is only happening on some sites not all sites. You could refer the two pictures with and without "Custom Report"button.



We have been working with Microsoft on this issue and have not identify the root cause or the solution. However, there is one symptom we identified that may related to this issue. We found the sites with "Custom Report"button have "Site Customized Reports" Document Library under View All Site Content page. Other sites without "Custom Report"button have not such Document Library on the sites. We just found the solution how to enable SharePoint 2010 Web Analytics "Custom Report".

 The second issue is IE 8 browser is not included in "Top Browser" report even IE 9 and all different Frirefox versions have been recorded. See the picture below. This seems like a IE 8 issue and you could find the reason why SharePoint 2010 Web Analytics "Top Browser" report does not record IE 8 browser.



The third issue is the duplicate entries for "Top Pages" report. The /Default.aspx is the same entry as whole URL like https://<servername>/sitename. However, both of them are listed in the report and we are not sure the reason. See the picture below for reference.


 
The forth issue is related to Best Bet Suggestion Report and Best Bet Action History Report. Best Bet Suggestion Report recommends URLs as most likely results for particular search queries based on analysis of usage patterns. The site administrators can accept or reject these suggestions. If they accept, the corresponding query-URL pair is added to the search keywords list. Best Bet Action History Report tracks the actions performed by the site administrator on the ‘Best Bet Suggestion’ Report. However, we are not be able to able to generate those reports and not be able to find the solution to generate these two reports. We have seen other people have similar issues and we are working with Microsoft to debug.

The fifth issue is related to capacity and performance of the Web Analytics services. If you recall the architecture of this service, the service depends on the log parser and report consolidator component. With increasing data, the report consolidator component may take longer than five hours to run that may impact the the performance. Here is the way you could enable the data trimming for this service.

  • You can enable data trimming using the Set-WebAnalyticsServiceApplication cmdlet. When data trimming is enabled, the number of rows of data in the tables in the reporting database is trimmed to 20,000 rows per day per component (site, site collection, Web application, etc.). This decreases the time that the Reporting Component takes to run. 
  • On the Start menu, click All Programs.
  • Click Microsoft SharePoint 2010 Products.
  • Click SharePoint 2010 Management Shell.
  • At the Windows PowerShell command prompt, type the following command: 
         Set-SPWebAnalyticsServiceApplication [-Identity <GUID>]-EnableDataTrimming

 Those are top issues we identified for Web Analytics services at this point. We are evaluating some other findings that could be shared in later time.
























Friday, February 11, 2011

SharePoint 2010 Web Analytics Service insight part I - Planning and Configuration

Web Analytics service as part of Microsoft® SharePoint® Server 2010, is set of features to help you collect, report, and analyze the usage and effectiveness of your SharePoint Server 2010 deployment. Web Analytics features include reporting, Web Analytics workflow, and Web Analytics Web Part.  There are three categories of the SharePoint Web Analytics reports: Traffic, Search, and Inventory. The reports are aggregated for various SharePoint entities like Site, Site Collection, and Web Application for each farm. For more information, see Reporting and usage analysis overview.

SharePoint 2010 Web Analytics Service Application is one of the services that consumes large server resource. This service is also one of the services offers many reports that some of them are difficult to explain.  After we configured and running this services four months in production it worth us to look at the reports generated to give us some idea how to utilize the service. We have also identified some issues for this service application that is the focus for this blog.

1.       SharePoint 2010 Web Analytics Service Application capacity plan and performance impact

If you looked at the Web Analytics service application architecture diagram, you will notice that it is using several services that is perform heavily duty file parsing processes. The architectural overview of the Web Analytics service in a SharePoint deployment is described in Figure1 from Microsoft.


Data is logged into .usage files on the front-end Web servers where it is processed into the staging database created in the previous steps through the Timer Job infrastructure.  The data in the staging database is retained for 30 days and transitioned into the reporting database for longer term retention as specified in the retention period when the service application was created.  The information is subsequently surfaced through a variety of Web Parts by the Web Analytics Web Service.

During planning phase, you would need to plan how much data you need to keep, the default is 25 month for the reporting DB. We changed to 13 month so users could view the whole year reports. Please refer Microsoft Web Analytics capacity planning.

 


2.       SharePoint 2010 Web Analytics Service Application setup procedure

Setup Web Analytics service is very simple. You could setup from central admin or through PowerShell scripts.

 

Here are steps from central admin.

  • Open SharePoint 2010 Central Administration and select Manage service applications under Application Management
  • Select New | Web Analytics Service Application on the ribbon user interface

  •  On the Create Web Analytics Service Application dialog specify the name for the new Web Analytics Service Application
  • Provide a name for the new Application Pool
  • Provide the name of the default database server where the Web Analytics reporting and staging databases will be hosted and specify the desired retention period
  • Click OK on the new Create Web Analytics Service Application dialog to provision the new service application
  • On a single server deployment select System Settings from SharePoint 2010 Central Administration and then click Services on Server
  • From the list of available services start the Web Analytics Data Processing Service and Web Analytics Web Service


You could create a SharePoint 2010 Web Analytics service application using PowerShell using the script provided by Microsoft TechNet. However, I would not recommend use PowerShell script.

You could refer to existing blog and make sure you plan the space of the staging and reporting space.

 

3.       How to setup Web Analytics features and different reports


 Web Analytics features include reporting, Web Analytics workflow, and Web Analytics Web Part. There are three categories of the SharePoint Web Analytics reports: Traffic, Search, and Inventory. The reports are aggregated for various SharePoint entities like Site, Site Collection, and Web Application for each farm. You could refer this blog for details.

The one set of the reports I would like to bring up to your attention is search reports. You would need to have permission to setup before you could get “good” result. For example Best Bets Suggestions allow search admins to determine what the most relevant search result is for a given keyword. You could setup it if you follow up the instructions. We are still having issues to get this web part working and will keep you posted the issues found.

Custom Web Analytics Reports are useful to get general understanding of what’s happening on your sites. To get started, click on Customize Report button under Analyze tab in Ribbon. 

Web Analytics Workflows is a powerful new feature set that enables you to get reports sent out either on a schedule or when specific conditions are met. To setup a WAW, go to Web Analytics report you’re interested in and click on Schedule Alerts or Reports on Analyze tab in Ribbon. 

Web Analytics Web Part targeted at Site Managers is an end-user facing Web Part that can be easily inserted into any page on your site. To use this Web Part, go into Edit mode of one of your Site Pages and click on any place you can add a Web Part. Then, from Insert tab on the Ribbon, click on Web Part. Finally, click on Content Rollup category and select Web Analytics Web Part.

Now, you should have all your Web Analytics features and reports ready for you to enjoy. In the next session, I will show you how to read different reports and some issues we encountered.

Monday, February 7, 2011

SharePoint 2010 upgraded site Navigation Up or Broken navigation tree issue

After we upgrade SharePoint form 2007 to 2010, we have identified many issues as listed in SharePoint 2010 upgrade real world exception handling blog. I may take some time to list in details on some of the issues and workaround. One of the mysterious is lots of sites have “Broken navigation tree” or “Empty Navigate Up control”. We have been working with Microsoft for the last seven months and we have finally found a good solution to fix it. Here are some tips that could help to understand the issues, identify the sites that have such issues, and the way to fix it.

1. Summary of the issue

SharePoint 2010 provides a very nice feature that you could click the navigation button to identify the location of the site and you could navigate the hierarchy. However, many sites migrated from 2007 navigation up is empty. You could see the following screenshot that “Navigation Up” is empty for the site.




2. What migrated 2007 site pages that may have such issue

We found navigate up issue for all the publishing pages (welcome page with webpart zones) created from collaboration portal template in 2007. Collaboration portal has been deprecated in 2010 and 2010 team sites with publishing feature enabled don’t have welcome page with webpart zones template option while creating publishing page. You could verify the site that will have navigate up issue from the page under ../Pages/Forms/AllItems.aspx/Default.aspx. If the site is created from collaboration portal and the default page is “Welcome page with Web Part zones”, the site will have “Navaigation Up” issue.

See the screenshot the Page Layout is “Welcome page with Web Part zones” for the default page. Please note this is the publishing pages under Pages folder NOT the SitePages under SItePages.




The possible pages that may have such issue are:
• DefaultLayout.aspx
• ReportCenterLayout.aspx
• TabViewPageLayout.aspx
• NewsHomeLayout.aspx

3. Root cause of the issues

The reason that the navigate up control is not displaying the correct navigation hierarchy on the pages is the Master Page and the Page Layout page associated to the page contain a PlaceHolderTitleBreadcrumb.

In the master page the PlaceHolderTitelBreadcrumb is defined as follows. Notice the .Net control that is added in the place holder (ListSiteMapPath). This is the control responsible for rendering the navigation hierarchy in Navigate Up.

<asp:ContentPlaceHolder id="PlaceHolderTitleBreadcrumb" runat="server">
     <SharePoint:ListSiteMapPath runat="server"
     SiteMapProviders="SPSiteMapProvider,SPContentMapProvider" RenderCurrentNodeAsLink="false"
     PathSeparator=""
     CssClass="s4-breadcrumb"
     NodeStyle-CssClass="s4-breadcrumbNode"
     …
</asp:ContentPlaceHolder>
</SharePoint:PopoutMenu>


Please note 2010 site page has changed to version 4 that is different from 2007 v3. When the version 3 site page layouts in 2007 are used they define the PlaceHolderTitleBreadcrumb as follows.

<asp:Content ContentPlaceHolderId="PlaceHolderTitleBreadcrum" runat="server" />

The content place holders in the layouts pages override the content place holders in the master page. So the above line in the layout page removes the navigation control hierarchy from the page.

This issue will occur if you use the following some other layouts as I listed in last session.


4. Procedure to reproduce the issue we submitted to Microsoft

The issues: Navigation up missing for sites created from 2007 collaboration portal template with publishing pages migrated from 2007 to 2010
Impacts: We have hundreds of sites uses are not able to use navigation on the site

Steps to reproduce the issues:
• Create sites using 2007 collaboration portal template
• Activate all publish features
• Add some webparts on the default home page – welcome page
• Add some sub-sites to test navigations
• Migrate the site from 2007 to 2010
• Verify Navigation up missing for the welcome page



5. Produces to fix this issue


To correct the issue with Navigate Up issue is very straight forward after we understand version 3 site page layouts in 2007 overwrite the navigation in 2010. This seems to be a design flaw for 2010. Here are the steps to fix the issue on default.aspx.

• Open the page layout in SharePoint Designer and remove the following line.

<asp:Content ContentPlaceHolderId="PlaceHolderTitleBreadcrum" runat="server" />

• Save the page layout, check it in, and then publish it. This will correct the issue for every page that uses the layout.


The TabViewPageLayout.aspx is the layout used for the Site Directory. This is the layout for category.aspx which is the default page for the Sites site in the collaboration portal. This layout has the PlaceHolderTitleBreadcrumb content place holder also but with the following tag.



This can also be removed and the Site Directory navigate up control will display the same as the rest of SharePoint 2010.



6. How to identify all the sites that might have this issues



At this time, you have understand the issue and the solution. However, you may not be able to identify the list of the site and pages that have the issue. You could use powershell script to identify pages on those sites that are having issues. Here is the one script you could run against the farm to list pages and sites.

-----------------------------------------------------------------------------------
$data = @()
$webApps = Get-SPWebApplication

foreach($webApp in $webApps)
{
$sites = $webApp.Sites

foreach($site in $sites)
{

foreach($web in $site.AllWebs)
{

foreach($list in $web.Lists)
{

if($list.Title -eq "Pages")
{

foreach($item in $list.Items)
{
[string]$pageLayout = $item["PublishingPageLayout"]
$temp = New-Object PSObject
$temp | Add-Member -MemberType NoteProperty -Name "URL" -value $web.Url
$temp | Add-Member -MemberType NoteProperty -Name "Library" -Value $list.Title
$temp | Add-Member -MemberType NoteProperty -Name "Page" -Value $item.Name
$temp | Add-Member -MemberType NoteProperty -Name "PageLayout" -Value $pageLayout

if($pageLayout.ToLower().Contains("defaultlayout.aspx") -or $pageLayout.ToLower().Contains("reportcenterlayout.aspx") -or $pageLayout.ToLower().Contains("tabviewpagelayout.aspx") -or $pageLayout.ToLower().Contains("newshomelayout.aspx"))
{
$temp | Add-Member -MemberType NoteProperty -Name "PageLayoutNeedsChange" -value $true

}
else
{
$temp | Add-Member -MemberType NoteProperty -Name "PageLayoutNeedsChange" -value $false
}
$data += $temp
}
}
}
$web.Dispose()
}
$site.Dispose()
}
}
$data | fl
-------------------------------------------------------------

If you have any feedback, please let me know.

Good luck on your upgrade!