views:

145

answers:

1

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?

+3  A: 

Hi ashwnacharya

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.

Per Jakobsen