Jean Paul's Blog

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

  • 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

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.


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.


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


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.



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:


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.


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.



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


2 Responses to “Layout Problem after Import Site”

  1. vikram said

    Hi tried your third approach but its not working for me .Can you please help me out with this regards .Thanks.

    • jeanpaulva said

      Hello Vikram,

      You can try more links replacement in the ASPX page.
      Search with “/_catalogs/masterpage” & replace with “NEWSITE/_catalogs/masterpage

      Jean Paul

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s