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 want to have a feature which will change some settings on every list on My Site. Problem is i cant change settings for two main list: Shared and Personal Documents.

For testing I have web feature which write to file all web lists titles when activating and list added events. I have second feature which is stapler defined for global template and start first feature on every new site.

When activating on existing site all is ok. When creating my site for new user I have only these lists:

Content type publishing error log
Converted Forms
Customized Reports
Form Templates
Hold Reports
Holds
List Template Gallery
Master Page Gallery
Solution Gallery
Style Library
TaxonomyHiddenList
Theme Gallery
User Information List
Web Part Gallery
wfpub

And listAdded is not fired.

What is special about these two lists that I can't attach to them?

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

The issue is the lists get created after the feature stapling is called in the Site Collection creation process. The My Site is a new Site Collection, not a new subsite, that's why the event receivers don't fire and the manual activation works.

I have used a thread pool solution like the one in the link below to delay the execution until the lists have been created. You can then modify the settings of them. It takes a while to get the timings correct, so make sure you test thoroughly.

http://social.technet.microsoft.com/Forums/en-US/sharepoint2010programming/thread/68382352-c751-4dea-a67f-69533ee442f6/

share|improve this answer
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.