The site is not valid. The 'Pages' document library is missing.
Description:
An unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the
error and where it originated in the code.
Exception Details:
Microsoft.SharePoint.Publishing.InvalidPublishingWebException: The site
is not valid. The 'Pages' document library is missing.
How to fix the problem?
To fix the issue it is required to update the value of the
__PagesListId property value to match the ID of the Pages library.
This can be done (e.g.) through the following Powershell script:
$web = get-spweb http://site-collection/path-to-affected-site
$correctId = $web.Lists["Pages"].ID
$web.AllProperties["__PagesListId"] = $correctId.ToString()
$web.Update()
Reference: http://blogs.technet.com/b/stefan_gossner/archive/2011/09/15/common-error-the-site-is-not-valid-the-pages-document-library-is-missing-error.aspx