locked
SPD message - The URL ../../_catalogs/masterpage is invalid

    Question

  •  

    When I open a page on one of my SP (MOSS 2007) sites using SharePoint Designer I get a pop-up with this error. I click OK and the page seems to load fine... as far as I can tell. These pages are in a publishing site, but aren't under the control of the publishing feature - they are forms for a list.

     

    I've searched around for some info on this error and have found a lot of solutions for masterpage, but nothing for this one specificaly related to SPD. Any thoughts?

     

    Thanks!

    Brent

     

    Wednesday, February 06, 2008 3:42 PM

Answers

  • Two things to check:

    1. make sure default master page has been set in the gallery

    2. the site master url is assigned by code, it may point to a master page other than default one

     

    (Subsites may inherit master page from parent in the publishing sites, check right gallery)
    • Proposed as answer by DLOCC Thursday, August 07, 2008 12:31 AM
    • Marked as answer by Mike Walsh FIN Friday, May 01, 2009 7:36 AM
    Saturday, May 17, 2008 3:00 AM

All replies

  • I have the same, would like to know what causes these errors.
    Thursday, February 07, 2008 8:13 AM
  • I'm having the same error.  Can someone help with this?

    Friday, February 08, 2008 1:58 PM
  • I've been getting this forever - I just ignore it.

     

    I have a custom master page.  I also have a logo on my page where I used $SPUrl:~SiteCollection in the master page and SPD reports an "Error Creating Control" on it, saying "The expression prefix 'SPUrl' was not recognized".

     

    I thought perhaps it was related to that.

     

    Friday, February 08, 2008 2:26 PM
  • I am having the same problem: if somebody would have a solution, it would be great.

     

    Sunday, February 10, 2008 12:48 PM
  • Same thing here. Too bad no one seems to know about this one... gota love the limited support on sharepoint.

     

    Wednesday, March 05, 2008 12:18 AM
  • I also have the same error message. Still no solution?

     

    Thursday, April 24, 2008 4:27 PM
  • Can anyone help us to understand the problem? been since Febuary and no one seems to care on responding with constructive troubleshooting or solution.

    Thursday, April 24, 2008 7:58 PM
  • I hope Microsoft is working on this problem and since lots of people getting this problem I do believe something is being done...

    Guess we just have to wait since hardly noone from Microsofts sharepoint team post anything here.
    Friday, April 25, 2008 7:28 AM
  •  

    well, i did found the solution.

     

    problem:

    code in your ASPX page is refering to an invalid masterpage.

     

    example code snipet top of the code

     

    <%@ Page language="C#" MasterPageFile="~masterurl/default.master"   

     

    The url is wrong and refering to the root master page

     

    Resolution:

     

    <%@ Page language="C#" MasterPageFile="_catalogs/masterpage/default.master"

     

    I just replaces the MasterPageFile to the right path.

     

    I hope this will help some of you.

    • Proposed as answer by M35 Friday, May 07, 2010 3:13 PM
    Friday, April 25, 2008 9:53 PM
  • That doesn't really help as far as I can tell.

     

    Unless I am mistaken, that will stop the error message, but then it will try using a default.master file from each site you create and not inherit from the parent.  The point of a master page is to have it use the same master page for every site.

     

    The ~masterurl/default.master is a token that is supposed to be replaced at runtime by SharePoint with the full path to the master page defined for the site in the SharePoint site configuration.

     

    Explained here: http://msdn2.microsoft.com/en-us/library/ms476046.aspx

     

    My guess is that the problem is that SharePoint Designer is not properly interpreting the ~masterurl token.

    Sunday, April 27, 2008 1:40 AM
  • That makes sense, that the token is not being correctly interpreted, but I have this issue also--what can we do to resolve it?

     

    Monday, May 05, 2008 2:54 PM
  •  

    Im having the same problem of "spurl was not recognized"

    Is there any solution or fix to this problem?

    Tuesday, May 13, 2008 12:59 PM
  • So we are all having the saem error message ...

    Mine however is displayed when I open the MasterPage    /_catalogs/masterpage/default.master

    a bit strange that there would be a "master page problem" within a Masterpage.

    (MP is stil the default one, not custumised yet..)

     

    Friday, May 16, 2008 2:35 PM
  • Two things to check:

    1. make sure default master page has been set in the gallery

    2. the site master url is assigned by code, it may point to a master page other than default one

     

    (Subsites may inherit master page from parent in the publishing sites, check right gallery)
    • Proposed as answer by DLOCC Thursday, August 07, 2008 12:31 AM
    • Marked as answer by Mike Walsh FIN Friday, May 01, 2009 7:36 AM
    Saturday, May 17, 2008 3:00 AM
  • That was it! Right-clicked on the default.master and clicked on Set as Default Master Page and the errors went away!
    • Proposed as answer by Mina Samy Monday, February 22, 2010 9:02 AM
    • Unproposed as answer by Mike Walsh FIN Friday, December 03, 2010 12:03 PM
    Thursday, July 24, 2008 8:52 PM
  • Kong.Fu.Panda said:

    Two things to check:

    1. make sure default master page has been set in the gallery

    2. the site master url is assigned by code, it may point to a master page other than default one

     

    (Subsites may inherit master page from parent in the publishing sites, check right gallery)



    The following is a correct solution for this error popup.  I elaborated in the following blog post: http://www.dlocc.com/sharepoint/36-solutions/70-sharepoint-masterpage-is-invalid-error-solution.html
    Devin Walker Microsoft SharePoint and InfoPath Enthusiast http://www.dlocc.com
    Thursday, August 07, 2008 12:31 AM
  • Another thing that can be done is navigate to your master page file, right click and select "New from Master Page".  This will definitely find that master page with which you'll want to work and no message.
    Tuesday, November 11, 2008 10:04 PM
  • It happens even when viewing a new master page: "The expression prefix 'SPUrl' was not recognized."
    Has anyone found a way to have SPD 2009 be at least as usable as FP?
    Thanks,
    Stephanus
    Tuesday, August 25, 2009 9:33 PM
  • Kong.Fu.Panda said:
    Two things to check:
    1. make sure default master page has been set in the gallery
    2. the site master url is assigned by code, it may point to a master page other than default one

    That didn't work for me.  I set the master page as default, no change.

    Friday, September 25, 2009 5:17 AM
  • Two things to check:

    1. make sure default master page has been set in the gallery

    2. the site master url is assigned by code, it may point to a master page other than default one

     

    (Subsites may inherit master page from parent in the publishing sites, check right gallery)

    If this is the 'answer' to this question, could at least the steps be posted on how to do these things?  A later post discusses right clicking on the default.master file and setting it as the default master page.  That post gave a clear resolution and that one post is worth more than a thousand of the one like this one which says verbage but doesn't really reveal the solution.
    Thursday, January 14, 2010 2:09 PM
  • This just happened again and I know the reason: I have a public-facing site and an internal publishing site used for authoring of both sites. I was trying to edit the master page on the public port and it gave me the same error. I switched to the internal site and it worked a charm.

     

    Friday, May 07, 2010 3:37 PM
  • bounce - me too - my custome master page IS the default master page - I have copied it, set the copy as default, created pages again from the new page, and still this error comes up.

     

    It wasn't always so - we must have done something.

    Monday, June 21, 2010 3:17 PM