Provision a new Publishing Site: The site is not valid. The 'Pages' document library is missing.

 

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

Fix: Waiting for the Publishing Feature at Web is completed and provides the ["__PublishingFeatureActivated"] and ["__PagesListId"]:

Because, the PublishingWeb will get the PageList via ["__PagesListId"]. property.

   while (!(subweb.AllProperties["__PublishingFeatureActivated"].ToString().Equals("True",StringComparison.InvariantCultureIgnoreCase)) ||

                                        !(subweb.AllProperties["__PagesListId"].ToString().Equals(PublishingWeb.GetPagesListId(subweb).ToString(),StringComparison.InvariantCultureIgnoreCase)))

            {

                Thread.Sleep(500);

            }

Comments

Popular posts from this blog

Setup SharePoint 2010

Register CSS to SP Master Page