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 tried deploying a Site Definition with a custom default.aspx page.

Within the <WebFeatures> node of the Site Definition's Onet.xml I tried to reference a Feature which would get a web part manager of the newly deployed default.aspx page.

This failed.

Why does the Feature Receiver of a dependant feature get called BEFORE modules are deployed from a Site Definition?

share|improve this question
    
I have edited your question for clarity, please can you check it. –  Charles Lee Apr 26 '10 at 15:16
add comment

1 Answer 1

up vote 0 down vote accepted

Creating sites from Site Defs and using Feature Receivers to modify the provisioned files from the Site Def will not work. You have to pay attention to the order of the provisioning. The feature receiver is firing before the files from the site def is provisioned.

SharePoint MCM Mirjam van Olst have an excellent post explaining this: http://sharepointchick.com/archive/0001/01/01/site-definition-provisioning-order.aspx

share|improve this answer
add comment

Your Answer

 
discard

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