Home > SharePoint Development > A possible cause for invalid master page error

A possible cause for invalid master page error

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
  1. fanren
    July 19, 2010 at 12:44 am

    Thanks a lot for sharing the experience. It really solves my issue.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: