.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> SharePoint >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Layout Problem after Export in SharePoint

Posted By:Jean Paul       Posted Date: April 24, 2014    Points: 200    Category: SharePoint    URL: http://www.dotnetspark.com  

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

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


 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend