Welcome to deBUG.to Community where you can ask questions and receive answers from Microsoft MVPs and other experts in our community.
0 like 0 dislike
1.8k views
in SharePoint Server by 31 37 42

In SharePoint Designer, I have a page layout that is not referenced by other pages. However, I can't delete it and I got this error "This item cannot be deleted because it is still referenced by other pages".

Server error This item cannot be deleted because it is still referenced by other pages

I also tried to delete all pages that were referenced to this page layout but still, I got "This item cannot be deleted because it is still referenced by other pages" in SharePoint Designer.


1 Answer

1 like 0 dislike
by 163 204 403
selected by
 
Best answer

Solving: This item cannot be deleted because it is still referenced by other pages

In SharePoint Designer, if your Master Page or Page Layout is already referenced to other pages, you will not be able to delete it and you will get this error This item cannot be deleted because it is still referenced by other pages.

This item cannot be deleted because it is still referenced by other pages

So, the first step to fix this error is to get all pages that are already referenced to Master Page or Page Layout that you wish to delete.

How to get all references for Master Page and Page Layout?

To find all pages that already referenced to a specific Master Page or Page Layout, you have to do the following:

  1. Open your site collection, go to Site Settings.
  2. Below "Site Administration", click on "Content and structure".
    Content and Structure SharePoint 2019
  3. In Content and structure, and at the left tree, click on "Master Page Gallary" to show all Master Pages and Pages Layout of your site.
  4. On the right side, all Master Pages, and Page Layout will be listed.
  5. Select you page for which you want to check its related resources and from the above toolbar, click on Show Related Resources.
    Get Related Resources for Page Layout SharePoint 2019
  6. At the page bottom, you will get all related pages that have already been referenced to the selected Master Page or Page Layout.
  7. In the "Located In" column, you can find the location for each page, so open the located page and change its page layout to another one to can delete the reference between it and the page layout that you wish to delete.
    Find all references for Master Page and  Page Layout SharePoint 2019
  8. After completing Step 7 on all referenced pages, Go back to SharePoint Designer, or Master Page Gallary in the browser, and try to delete the Page Layout which should be deleted successfully now.
by 31 37 42
0 0
Thanks a lot, You saved my day!
If you don’t ask, the answer is always NO!
...