The site is not valid. The 'Pages' document library is missing. at Microsoft.SharePoint.Publishing.PublishingWeb.get_PagesList() at Microsoft.SharePoint.Publishing.Internal.CodeBehind.BasePageSettingsPage.LoadValues() at Microsoft.SharePoint.Publishing.Internal.CodeBehind.CreatePagePage.LoadValues() at Microsoft.SharePoint.Publishing.Internal.CodeBehind.BasePageSettingsPage.OnLoad(EventArgs e) at Microsoft.SharePoint.Publishing.Internal.CodeBehind.CreatePagePage.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Above error is occurring when trying to add page in Page library through UI. Please help to resolve the issue.

Office SharePoint Server Publishing feature is active.

2 Answers 2


Try deactivating and activating publishing feature

stsadm -o deactivatefeature -name PublishingWeb -url http://siteurl -force
stsadm -o activatefeature -name PublishingWeb -url https:/siteurl
  • Thanks Amal,it worked but after activation all the pages of Page library got added to Global navigation horizontally to the site. How can I remove those unwanted tabs from horizontal navigation.
    – Rushikesh
    Jan 20, 2015 at 9:55

Running the below PowerShell script fixes the issue, you need to change the site url in line 01. The script is actually looks for the pages library in the site for which url is given and assigns the ID of the pages library to the __PagesListId property.

$web = get-spweb http://site-collection/path-to-affected-site
$correctId = $web.Lists["Pages"].ID
$web.AllProperties["__PagesListId"] = $correctId.ToString()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.