Users not able to Save and Checkin Pages in SharePoint ‘Pages’ library

While working for one of our clients, I found that users are not able to save and checkin pages in ‘Pages’ library though they could Checkout page without any problem. By looking at the error logs based, I found this –

Actual Error in LOG File:

System.ArgumentException: Invalid SPListItem. The SPListItem provided is not compatible with a Publishing Page.    at Microsoft.SharePoint.Publishing.PublishingPage.GetPublishingPage(SPListItem sourceListItem) at Microsoft.SharePoint.Publishing.Internal.WebControls.
PublishingPageStateControl.RaisePostBackEventForPageRouting(String eventArgument, SPRibbonCommandHandler control,
RaisePostBackEventDelegate raisePostBackEventDelegate)    
at Microsoft.SharePoint.Publishing.Internal.WebControls.PublishingPageCheckinHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


First try to Deactivate and ReActivate the Sharepoint Site Publishing Infrastructure feature at both Scopes (Site And Web) level.
If this will not solve your problem then try to run following Power shell script.
$web = get-spweb “http://site-collection/path-to-affected-site” $correctId = $web.Lists[“Pages”].ID $web.AllProperties[“__PagesListId”] = $correctId.ToString() $web.Update() $web.AllProperties[“__PublishingFeatureActivated”] = “True” $web.Update()


Leave a Comment

Your email address will not be published. Required fields are marked *