开发者

Site Columns, Page layouts etc not getting deleted on Feature deactivation

开发者 https://www.devze.com 2022-12-19 00:12 出处:网络
I have written a publishing feature which creates some site columns, a content type referring these site columns, a master page and some page layout开发者_如何转开发s.

I have written a publishing feature which creates some site columns, a content type referring these site columns, a master page and some page layout开发者_如何转开发s.

When I deactivate this feature, the site columns, the master page and the page layouts are not getting deleted from their gallery.

What am I doing wrong here?

Should I be writing an event handler for deleting these files? Shoudnt the deactivation take care of it out of the box?


SharePoint will never remove any artifacts of a type which potentially could cause a user to loose data/changes as part of deactivation of a feature. A user could have used/changed your site column of contenttype and she could have customized the masterpage or page layout.

This non removal is in effect even though the user didn't make any use/change of the artifacts. Which is good because then if you're sure you want to remove them then you can always do it in a feature receiver and don't have to check is SP removed them.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号