Archive

Posts Tagged ‘SharePoint Development’

A possible cause for invalid master page error

March 5, 2010 1 comment

Another one for to save my sanity… and yours hopefully.

If you are updating the master page URL through managed code then you might experience the issue where the master page is applied successfully but on the Site Master Page Setting page you encounter the following errors:

  • The site master page setting currently applied to this site is invalid. Please select a new master page and apply it
  • The system master page setting currently applied to this site is invalid. Please select a new master page and apply it

Invalid master page messages

When the page loads it attempts to match the currently applied master page with a value from the list of master pages in the Master Page Gallery in order to indicate the selected master page in the drop list:

List of available master pages

This match is case-sensitive therefore you must ensure that when the MasterUrl and CustomMasterUrl values are updated using the object model that you use the exact name for the master page as it appears in the Master Page Gallery.

Advertisements