-1

How do I detach a page layout from a page and attach a different one? Is there a powershell command. SharePoint Designer is throwing an error.

I deployed a new set of master pages and page layouts and removed my old ones. I missed detaching a couple pages from the page layouts and now when I try to open those pages I'm getting a File Not Found. I've recovered the old page layouts and I still cannot open the pages. I tried detaching the page layout in SharePoint Designer but it's throwing an error "operation is not valid due to the state of the object."

2
  • You can change the page layout directly by Editing the page in browser , why do you want to detach ..? , Question is not clear..... How could you remove old page layouts , while it is already atached to some pages..? Oct 5, 2015 at 9:35
  • I can't edit the page in the browser. When I do I get a file not found message. The page that is missing is the layout page, so I need to detach the layout page so I can edit it in the browser. Oct 5, 2015 at 11:09

1 Answer 1

0

I found the solution: I had to download the page and edit the properties in a text editor and then upload the file. DO NOT DELETE THE FILE on the SharePoint site and re-add. It but be copied over the original.

Steps to fix this issue. Download the SharePoint Page. Navigate to the location of the new page layout Take note of the following: 1) Name 2) Title 3) ContentTypeId (IN THE URL).

Edit the Page in text editor - use the values from above without the "*" below. Replace xxx.xxx.com with your site. |mso:ContentTypeId msdt:dt="string"|***ContentTypeId*|/mso:ContentTypeId| |mso:PublishingPageLayoutName msdt:dt="string"|Name|/mso:PublishingPageLayoutName| |mso:PublishingPageLayout msdt:dt="string"|https://xxx.xxx.com/_catalogs/masterpage/Name, Title|/mso:PublishingPageLayout| Upload the Page to the same location as the original.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.