SharePoint 2010 – The site is not valid. The ‘Pages’ document library is missing

Keyword:
* The site is not valid. The ‘Pages’ document library is missing
* Unable to create publishing page
* Unable to save or publish publishing page
* Exception Details: Microsoft.SharePoint.Publishing.InvalidPublishingWebException: The site is not valid. The ‘Pages’ document library is missing.

Root Cause:
* Publishing feature is not active
* Publishing feature is showing active and SharePoint
* The value stored in the “__PagesListId” does not match the ID of the actual Pages library

Solution:
* Make sure publishing feature is active
* Try to de-activate and re-activate the publishing feature if you see the publishing feature is showing active
* Run the following PowerShell script to fix inconsistency of the actual Pages library and try to de-activate and re-activate the publishing feature again:

$web = get-spweb http://url/affectedsitecoll
$correctId = $web.Lists["Pages"].ID
$web.AllProperties["__PagesListId"] = $correctId.ToString()
$web.Update()

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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