After restoring a site collection to a new location you get error The file /_catalogs/masterpage/blahblah.aspx does not exist.
By peter.stilgoe
How To Fix Publishing Pages Page Layout URL
The scenario when moving you want to move a publishing site collection that is your root site collection to a new location
ie http://rootsc —> http://sites/rootsc
You expect a simple backup & restore to the new location to do the job. However once your restore is complete you try to load your site collection in its new location & you get:
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
You click ‘View Source’ in IE & you get:
The file /_catalogs/masterpage/blahblah.aspx does not exist.
at Microsoft.SharePoint.ApplicationRuntime.SPRequestModuleData.GetWebPartPageData(HttpContext context, String path, Boolean throwIfFileNotFound)
The problem is that your publishing pages are still looking at the old location for the master page files etc using the old URL. Fortunately Gary Lapointe MVP has written a script to parse through the whole site collection & update the paths accordingly.
The utility runs as an STSADM command & is called gl-fixpublishingpagespagelayouturl
Read more about it & download it here
More From pstilgoe
Sharepoint Master Pages , Sharepoint Pages , Sharepoint Publishing Sites 


March 24th, 2010
