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

遇到过想删除掉这个MasterPage会出现这个错误:
This item cannot be deleted because it is still referenced by other pages

blogspot我查到一个很简单,很不可思议的办法:
居然是
用SharePoint Designer開個新Folder, 把Custom Msater Page移過去, 整個Folder砍掉, 打完收工.

真是神奇,感叹自己对SharePoint的认识超级不足...... 不过砍之前 要记得改掉Page的MasterPage连接啊,要不然访问的时候就会出现 File not found 的错误

下面是引用那篇文章的:
From : http://insidecsharp.blogspot.com/2007/07/chris-option-4-aspxascxuser-control.html

根據Chris說法 裡面的Option 4, 我們可以在ASPX中加上我們自己的ASCX(User Control), 這一部分我們可以把他綁在Custom Master Page中, 這個是可行的方案.

接下來我們可以根據Heather
說法, 把Custom Master Page綁到Feature中, 然後安裝. 這一部分也是可行的.

以上的動作我會在下一篇中根據我的經驗做一個詳細的介紹.

但是當你把Custom Master Page掛上去後, Activate後, 當你想要更動了, 怎麼辦, 這一部分只好倒著做.

1. 把所有有套用Custom Master Page的Site都換成Default Master Page.
2. Deactivate Custom Master Page.
3. Using stsadm to uninstall the custom master page feature, as follow, stsadm -o uninstallfeature -name [CUSTOMMASTERPAGE]
4. Maybe u got some error message, just using -force.

按照正常的狀況, 接下來我們就可以修改Feature, 再上一次.

但世事總與人願違, 你會發現, 新的feature套不太上去!!! What happen?

當在上面Step 4的時候, 你可以到曾經套用過Custom Master Page的Site看看, 你會發現就算你把Feature卸了下來, 然而Custom Master Page還在List中, 所以才會新版的套不太上去!
怎麼辦, 殺掉應該可以了吧!

但是不管你在SharePoint Site 還是 SharePoint Designer, 你都殺不掉它, 錯誤訊息就是

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

找了KB, 你會發現KB926812好像有說明, 但是等你照做, 你會了解他只是規避問題, 藏起來....這不是掩耳盜鈴嗎?

幸好 Johntimney 有找到
方法, 還真神奇的方法, 居然是用SharePoint Designer開個新Folder, 把Custom Msater Page移過去, 整個Folder砍掉, 打完收工.


posted @ 2009-01-20 11:55  chris_thanks  阅读(338)  评论(0编辑  收藏  举报