Recently, our intranet has been renamed from gw to g10. With this change, some pages receives an unexpected error when changing the page layout.
I opened the site in SPD and tried “Detach from Page Layout”, threw the following error
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.
- Open the site which contains the page that had error in SPD.
- Go to All Files ->Pages->highlight the page that didn’t work.
- From the top ribbon, select Export File. Save to a location where you can find later on.
- Right click on the exported file and open in notepad.
- Ctrl + F and search for “_catalogs/masterpage/DefaultLayout.aspx”. You should only find one result and notice that link pointed to the wrong domain.
- Change the domain to your current correct domain and Save.
- Copy the file back to SPD, overwrite the existing one.
- Go back to the browser and change a page layout. It works!