Today I had a problem with a site collection feature I wanted to activate using a custom onet.xml. I’m developing a WCMS intranet site with custom Master pages and Page layouts so I created my own features and a custom onet.xml.
I referenced the feature GUID of the MOSS 2007 Publishing Site feature in the SiteFeatures section.
After creating the Site Collection the feature was not activated and I wondered why. I got no error message… the feature was just not activated.
This is how I referenced the Publishing Site feature in the SiteFeatures section:
<SiteFeatures>
...
<!—PublishingSite -->
<FeatureID=" f6924d36-2fa8-4f0b-b16d-06b7250180fa" />
...
<SiteFeatures>
As you can see I made a mistake because I inserted a blank right before the feature GUID.
<SiteFeatures>
...
<!—PublishingSite -->
<FeatureID="f6924d36-2fa8-4f0b-b16d-06b7250180fa" />
...
<SiteFeatures>
After removing the blank I did an iisreset and recreated my Site Collection.
I hope this helps before someone searches hours ;)