Question

I Have created a stapling feature so i can activate the publishing infraestructure feature by default on new blank site.

It does work as expected, the only problem is that the new created site, does not have the left menu visible, and there is no way make it visible.

This does not happen on Team sites, but only on new blank sites.

If I disable the stapling feature and create a new blank site and manually activate the Publishing Infraestructure feature everything works as expected and the menu is visible.

Any clues?

Thanks

Was it helpful?

Solution

What we found is that when you activate a feature in code, e.g. in a feature stapler, any dependant features it lists are not activated. The Publishing feature has a number of dependant features, hence the result you are seeing.

We used PowerShell to enumerate the "missing" features and then added them to our list of features to activate. We tested our result by running a PS script which listed all of the features active at both the Site and Web level for both cases (auto-activate vs. manual).

This is not a perfect solution. However, the cost / benefit ratio was better than the other options in our particular case.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top