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?

  • I have edited your question for clarity, please can you check it. Apr 26, 2010 at 15:16

1 Answer 1


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.