网站栏、页面布局等在功能停用时不会被删除

发布于 2024-08-20 01:43:30 字数 150 浏览 6 评论 0原文

我编写了一个发布功能,它创建一些网站栏、引用这些网站栏的内容类型、母版页和一些页面布局。

当我停用此功能时,网站栏、母版页和页面布局不会从其库中删除。

我在这里做错了什么?

我应该编写一个事件处理程序来删除这些文件吗?停用应该开箱即用吗?

I have written a publishing feature which creates some site columns, a content type referring these site columns, a master page and some page layouts.

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

伤感在游骋 2024-08-27 01:43:30

SharePoint 永远不会删除任何可能导致用户在停用功能时丢失数据/更改的类型的工件。用户可能已经使用/更改了您网站的内容类型列,并且她可能已经自定义了母版页或页面布局。

即使用户没有对工件进行任何使用/更改,这种不删除仍然有效。这很好,因为如果您确定要删除它们,那么您始终可以在功能接收器中执行此操作,而不必检查 SP 是否删除了它们。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文