onet.xml : dependency between site feature and site collection feature doesn’t work like in 2007

I’ve just noticed that unlike in SharePoint 2007, in SharePoint 2010 activating a site collection feature in onet.xml from a sub site doesn’t work. This was very easy, if in your child site you needed to make sure that a site collection feature (like the Publishing feature) was activated before activating your site feature (like publishing feature).


If the site collection feature is not activated, you’ll get this error message :


The solution is of course to create a Feature Receiver that will check & activate the Site Collection feature.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s