Monday, February 4, 2013

Issue with creating a copy of seattle.master in 2013 using SharePoint Designer

I’m working on a project and wanted to prototype my master page by copying seattle.master to a custom one.

I fired up SPD, located the Master Pages folder, selected seattle.master, right-clicked and chose copy, than paste into a new copy. This gave me a file named seattle_copy(1).master. Next step is to rename it, and that’s when you get a nice error message:
“Server error: This file may not be moved, deleted, renamed, or otherwise edited”.
image
This message is typically presented when you have files attached to the master page, which I don’t as I just made a copy. So I can’t rename it, I can’t delete it. The old 2010 trick of moving it to a folder doesn’t work either.

The solution

The issue is that you should copy seattle.html which will auto create a .master page for you, and there is a link between the files. To resolve the issue, create a copy of seattle.html. Now you have both a seattle_copy(1).html and seattle_copy(1).master. Next rename seattle_copy(1).html to for example test.html. A pop-up appears asking you to update pages that have hyperlinks to the page. Click “yes”.

image

After the rename a file named test.master appears as well.

image

You can now select seattle_copy(1).master and delete it. If you want to delete your new custom master page, select the .html version and delete it. This will also delete the .master file.

32 comments:

  1. Hi Mikael,
    I followed these steps, but am getting the same error when attempting to edit the new .master file which was automatically created when I created my copy of the .html file... "Server error: This file may not be moved, deleted, renamed, or otherwise edited."... Have you run into this issue at all?

    ReplyDelete
    Replies
    1. Hi,
      You should only edit the .html version of the file, not the .master version which is auto-generated.

      Thanks,
      Mikael

      Delete
    2. Mikael - If you are not permitted (or shouldn't) edit the .master then how do you update the favicon.ico? Which is located in the .master.

      I have a custom one that is located at /_layouts/15/images/custom/favicon.ico

      Delete
    3. You edit the .html version :) You may hover create .master files as well without a .html counter part.

      Delete
  2. Worked for me. Thanks!

    ReplyDelete
  3. Thank you. This really helped me.

    ReplyDelete
  4. Worked a treat - thanks!
    It's "features" like this that drive me nuts when using SharePoint...

    ReplyDelete
  5. Worked fine... It's obvious that I need to increase my master page knowledge. :D :D

    ReplyDelete
  6. I had the same problem and unfortunately its didn't fix it. But I found a solution in this answer: http://social.msdn.microsoft.com/Forums/windowsazure/en-US/9c86442c-4322-412e-a486-f66ba5c52ade/suitebarbrandingelementhtml-not-visible?forum=sharepointgeneral

    Just uncheck the Associated File box. If it is unchecked, check -> save-> uncheck
    Worked for me I can now edit my seatle.master

    ReplyDelete
  7. I have followed same steps and getting same error.
    Just I need to add ".ico" (favicon.ico). I don't have any idea how to do this with .html. I know only do this with .master.
    Please explain how to do that and where/how can I save the image also.
    Thanks

    ReplyDelete
    Replies
    1. Hi,
      You can very well create a .master in 2013 as well. And the .html version is quite similar.. it just gets compiled to a .master. Should be the same way to add ico reference.

      Delete
  8. Hi This venkat

    I have fallowed above mentioned steps to edit the master file but still remains same
    “Server error: This file may not be moved, deleted, renamed, or otherwise edited”.

    Please assist

    ReplyDelete
    Replies
    1. Hi,
      Not sure what is happening then if you follow the steps. Weird indeed.

      Delete
  9. Another option, to temporarily set another page as the default master, is shown here:
    http://community.office365.com/en-us/f/154/t/164055.aspx

    ReplyDelete
  10. Hi All,
    Anybody can help me on this? i am getting same error i tried the steps too.It is kind of urgent.

    ReplyDelete
  11. This works like a charm. Thank you very much for sharing. :)

    ReplyDelete
  12. what if i want edit .master file rather .html version??
    is it possible??if yes then please please guide me regarding
    and also there is problem with .html page while you are adding any custom web part to it because that web partv code containe some aspx based code and that's not supportaed by simple html,
    it will be such greatness ,if someone could help me



    Thanks In andvance

    ReplyDelete
    Replies
    1. If you want to work with just a .master file, then create a new one - don't use the one which has a coupled .html file to it. So, create a new .master page, copy the contents of seattle.master to it and do as you always have.

      Delete
    2. thanks Mikael for your kind reply,
      and sorry because I am gone ask you for more help.shall I??

      Delete
  13. Thank you Mikael with the your valuable suggestion I have an added a web part to a master page successfully,but that's not getting execute within the master page,it shows me the error as mentioned below,but I can add that web part(custom) to web part page there is no any issue with that,the problem arises when I am adding that web part(custom) to master page.

    Getting Error Message for Exception System.NullReferenceException: Object reference not set to an instance of an object.
    at Microsoft.SharePoint.WebPartPages.BinaryWebPartSerializer.Serialize(PersonalizationScope scope, BinaryWebPartSerializerFlag binaryWebPartSerializerFlags, BinaryWebPartSerializerWriter writer)
    at Microsoft.SharePoint.WebPartPages.BinaryWebPartSerializer.Serialize(SerializationMode mode, BinaryWebPartSerializerFlag binaryWebPartSerializerFlags, BinaryWebPartSerializerWriter writer)
    at Microsoft.SharePoint.WebPartPages.SPUserCodeWebPart.EnsurePersistedBlobsMatchPropertiesCollection()
    at Microsoft.SharePoint.WebPartPages.SPUserCodeWebPart.GetWebPartDataForRemoteCall(Object& viewState, Object& controlState)
    at Microsoft.SharePoint.UserCode.SPUserCodeWebPartRemoteExecutionHelper.ExecuteRequestInSandBox(HttpContext context, SPWeb web, SPWebPartManager manager, SPUserCodeWebPart userCodeWebPart)



    I am getting the above web part error,after adding the web part(custom) to master page.


    need help,
    many many Thanks in advance.

    ReplyDelete
  14. thanks very usefull your solution

    ReplyDelete