SharePoint 2010 – This page is not using a valid page layout

Migrating content from SharePoint 2007 to SharePoint 2010 is a pain. Especially with sites that have publishing enabled. Sometimes the migrated pages really feel uncomfortable in their new environment and show this error:

However, you can only change the page layout if you can open and edit the page. But the error shows up every time you try to do that.

Solution: In case you do not have access to power shell or to the production server. Or if the number of files affected is too less to warrant a server side code deployment, try this:

  • Download a copy of the page from the source library.
  • I’m assuming you had already copied the page layout to the destination site collection. Go to the Master Page gallery and copy the path to the particular page layout.
  • In the downloaded copy of the page, change the contents of the tag <PublishingPageLayout>. It would contain the path to the page layout in the source site collection. You would need to replace that with the path to the page layout at the destination site collection.
  • Upload the updated file into the destination Pages library.
  • See it work!

This approach is also useful when you are using any third party tools like ShareGate to migrate content between dev and production. However, if you have hundreds of pages with the issue, you are better off doing what this guy did:


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