Tuesday, August 7, 2012

How to fix SharePoint Designer 2010 error "The URL '_catalogs/masterpage/page layout.aspx' is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current web."

What?

SharePoint Designer 2010 throws error "The URL '_catalogs/masterpage/page layout.aspx' is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current web." when you attempt to update an existing page layout. All other page layouts can be updated normally.


Why?

There could be various reasons for this error. I have already explained about one of the various reasons that could trigger this error in this blog post earlier.

How?

This error occurs when there is an error in the page layout that is being modified. Clearly the error description is wrong and misleading :)

I have switched the publishing master page from our custom master page to a different master page. The current page layout being modified has a ContentPlaceHolder called "PlaceHolderBreadcrumb" that does not exist in the new.master page.


In my case I have noticed the below in ULS logs:

System.Web.HttpException: Cannot find ContentPlaceHolder 'PlaceHolderBreadcrumb' in the master page '/_catalogs/masterpage/v4.master', verify content control's ContentPlaceHolderID attribute in the content page.    at System.Web.UI.MasterPage.CreateMaster

After adding the missing ContentPlaceHolder to the master page and restarting SharePoint Designer, the error has disappeared.

No comments:

Post a Comment