This page is not using a valid page layout – how to fix

This post describes an issue when trying to view classic publishing pages in SharePoint Online and how to resolve.


The issue

After migrating publishing sites from SharePoint 2010 – SharePoint Online, I encountered an issue with classic SharePoint Server publishing pages. Post-migration, some publishing pages wouldn’t open and displayed this error message:

Fix publishing pages with custom page layouts created from template - HANDS  ON SharePoint
Now another issue with this was that quite often the publishing pages affected were the migrated sites’ homepage – rendering the whole site inoperable! Microsoft have an article on the issue here and state that the cause is that “The .aspx page is using an invalid page layout, or the current layout is corrupt”.

Resolution

The Microsoft documentation on how to resolve this is pretty good, but I found it didn’t quite get me to fix my issue. Here’s what I did:

  • Navigate to Site Content & Structure: /_layouts/sitemanager.aspx. NOTE: You need to be a SharePoint admin to access
  • Open the Pages library > find your broken page > click on the drop-down button and press edit page settings
  • Select the (Welcome Page) Blank Web Part Page layout
  • Press OK

When I had to do this for my broken pages, there was a warning message above the page layout that said “Current page layout is not valid. Please select a valid page layout from the drop down list below”. I just selected the (Welcome Page) Blank Web Part Page layout anyway, pressed OK and it worked.


Advertisement

Fix pages with no publishing options in SharePoint

(This post was written using a SharePoint 2010 environment)

So you’ve got a SharePoint site, it all looks good (well, as good as it can!) but you notice that the Publish tab isn’t available in the ribbon.

First things first you check the site settings to see if SharePoint Server Publishing is turned on.

SP2010-publishing-feature.png

If you get to this point and your still no further forward it’s likely that your site wasn’t set up as a publishing site, but if you follow the steps below and your pages will be able to be published in no time.

  1. Open the site in question, then go to Site Actions > View All Site Content
  2. Open the SitePages library
  3. Under Library Tools > Library, select Library Settings

    SP2010-librarysettings
  4. Under General Settings > Versioning Settings, turn on Create major and minor (draft) versions > press OK
    SP2010-versioning

  5. Go back to the original page, you will now see the publishing tab has appeared!