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
List Template Gallery
Master Page Gallery
Solution Gallery
Style Library
Theme Gallery
User Information List
Web Part Gallery

And listAdded is not fired.

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


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.


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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