Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a custom project site template which is coded in c#.net VS 2010, I have deployed the projects related to the project site template into central admin through VS

After deploying the solution I have created a web App from CENTRAL ADMIN and a site collection under it with the custom project site template I had.

When I go and view the site collection I have created everything is working fine but I have a problem in my site content type mapping...

I have Meta data column of my own with the custom site content type which is there in custom project site template

The main problem is :The related feature of the content type is activated but the site content type doesn't get higlighted for that meta data column in the taxonomy field. but when I deactivate and activate the feature the content type is getting highlighted...

As per my understanding I think the list and their column are created before the feature event receiver is fired.. Any help on this?? I am looking forward for a solution for the past three day but couldn't find any... I think this post might help, thanks in advance:-)

share|improve this question
add comment

1 Answer 1

When creating a site using Site Definition SharePoint Performs these steps

  1. Create the url for the site
  2. Provision the GLOBAL onet.xml
  3. If new Site Collection activate in order
  4. If new Site Collection activate Site Collection scoped stapled features in random order
  5. Activate in order
  6. Activate Site scoped stapled features in random order
  7. Create list instances defined in onet.xml
  8. Create modules defined in onet.xml

So if the list instance is defined in onet.xml then it's create after any feature receivers.
My recommendation is to never have List instances or Modules in onet.xml, but move them into features such that you can control the order.

share|improve this answer
    
Thanks for the reply!! can u please be more eloborative on this?? Below I am explainig the problem occuring and steps followed by me. This one is on high priority.. 1) I have created team site template 2) Added custom feature with feature event receiver. In event activation logging message in event viewer 3) I specified custom feature ID in ONET.Xml. 4) Deployed project at form level. 5) Checked in site collection feature it’s activated 6) But Event not fired.(Event viewer empty) 7) Deactivating and Activating feature its working fine. (Event viewer with message) Appreciate if anybody provide –  user8517 May 24 '12 at 9:10
    
Can you post the code in the Feature Event Receiver? –  Per Jakobsen May 24 '12 at 9:19
    
Thanks for the quick response. I think there is no issue with code as i am logging message in Event viewer. When i am deactivating and activating its working fine(Its Logging message in event viewer). Appreciate if anybody provide –  kart May 24 '12 at 12:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.