Jean Paul's Blog

There are 2 types of People in the World, One who Likes SharePoint and..

    Advertisements
  • Microsoft MVP

  • MindCracker MVP

  • CodeProject MVP

  • eBook on SharePoint 2010

  • eBook on Design Patterns

  • eBook on Windows Azure

  • NLayers Framework @ CodePlex

  • MSDN Forums

  • .Net vs. Java

    Due to Public Demand
  • Advertisements

Posts Tagged ‘problem’

Layout Problem after Import Site

Posted by Paul on July 9, 2013

In this article I would like to explain a problem I faced after import & the solution.

Scenario

I was converting a site to site collection using PowerShell commands.

The source site was: http://server/site

The destination site collection was: http://server/newsite

Please note that the URLs are same in this case.

Error

After the import, one of the sub sites having Publishing Pages inside it throws Layout Error as shown:

clip_image001

Error Message: This page is not using a valid page layout. To correct the problem, edit page settings and select a valid page layout.

Root Cause

This is a bug within Exported Sites where the parent site layout master-page url is hard-coded inside the publishing page. There is no way to change it through SharePoint user interface.

Reference: http://support.microsoft.com/kb/953445

Solution

You can try one of the following solutions:

1. Use the PowerShell in following link to update the page with correct master page URL link

2. Use the C# code in following link to update the page with correct master page URL link

3. Modify the page manually

Modify the Page Manually

In my case the first 2 options did not worked, then I downloaded the file, modified it, uploaded back & the problem was resolved.

Please follow the following steps:

Step 1: Download File

Open the Pages library of the affected page. You can use direct URL as given below:

http://server/_layouts/viewlsts.aspx

In the appearing page choose the Pages library and download the Default.aspx page. (Choose item context menu, Send To > Download a Copy button)

Step 2: Modify File

Open the ASPX file & locate the section <mso:PublishingPageLayout>. A sample text is given below:

<mso:PublishingPageLayout msdt:dt=”string”>/_catalogs/masterpage/WelcomeLinks.aspx, Welcome Links</mso:PublishingPageLayout>

Please note that the link is pointing to the root site, in my case it should point to the new site collection. So I will change the URL: /_catalogs/masterpage/WelcomeLinks.aspx

To new URL: /newsite/_catalogs/masterpage/WelcomeLinks.aspx

Step 3: Upload File

Now upload the file back to the same library & overwrite existing one. Make sure you check in the changes.

Step 4: Retest Page

Now go back to the browser, clear the cache & retry the problem sub site. This time you should see the Page is working correctly.

clip_image003

You need to ensure that the Publishing feature is enabled in the newly created site collection & site. Additionally make sure the master pages are valid. You can see master pages through url _catalogs/masterpage.

References

http://bit.ly/187yOGq

Summary

In this article we have explored a possible After-Import problem & the Solutions.

Advertisements

Posted in SharePoint, SharePoint 2010 | Tagged: , , , , , | 2 Comments »