Unexpected error when change page layouts

Problem:

Recently, our intranet has been renamed from gw to g10. With this change, some pages receives an unexpected error when changing the page layout.

Unexpected Error

I opened the site in SPD and tried “Detach from Page Layout”, threw the following error

 

 

question

After searching on the net, this article talked about the same problem and provided some power shell code to solve it. There were some drawbacks of this solution discussed in the comments section. So I didn’t take this approach. Another article really helped me. Thanks to the person who shared the problem and the solution.

Solution:

  1. Open the site which contains the page that had error in SPD.
  2. Go to All Files ->Pages->highlight the page that didn’t work.
  3. From the top ribbon, select Export File. Save to a location where you can find later on.
  4. Right click on the exported file and open in notepad.
  5. Ctrl + F and search for “_catalogs/masterpage/DefaultLayout.aspx”. You should only find one result and notice that link pointed to the wrong domain.
  6. Change the domain to your current correct domain and Save.
  7. Copy the file back to SPD, overwrite the existing one.
  8. Go back to the browser and change a page layout. It works!

 

Advertisements

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