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

Site template works fine if accessed on SharePoint 2013 server. Please suggest if any limitation that would not allow to import site template designed in SharePoint 2013 on to SharePoint Online.

  • Have you hardcoded your master page url inside the publishing page? Commented Jun 22, 2016 at 4:25
  • I m not sure what you are asking me to check, can you elaborate how can i check if its hardcoded or not?
    – Jason
    Commented Jun 22, 2016 at 5:12
  • Have you used any publishing page and custom master page in your site before taking it as template? Commented Jun 22, 2016 at 5:13
  • Yes created using publishing page and enabled save as template feature for Publishing site by changing the value to TRUE for save as template under site options from SPD2013
    – Jason
    Commented Jun 22, 2016 at 5:15

1 Answer 1


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

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 . 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.

NOTE: 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.