Nikhil Vaghela
Nikhil Vaghela

Reputation: 930

SharePoint feature not getting activated by default

I have created a feature and i am auto activating it whenever 'My Site' gets created.

I am activating it for the template SPSMSITEHOST. This feature changes the Picture URL property of User Profile. Now, the problem is my feature gets activated but it seems it does not execute the code by default and and does not change the picture URL property.

When i deactivate the feature and activate the feature again then feature works absolutely fine as expected. P.S: I am facing this issue on Production server, surprisingly this work fine on Staging server , i mean the same code !!

Any help ??

Thanks.

Upvotes: 0

Views: 1449

Answers (2)

Mohammed
Mohammed

Reputation: 1

After long investigating and search for this problem i tried to rearrange the features at package file depending on the features dependencies, it seems SharePoint activate these features one by one as it's arranged in the package file and this is worked for me :)

Upvotes: 0

Zeb
Zeb

Reputation: 506

Sounds like something becomes out of sync on your production environment. Could it be caused by load balancing?

Are you doing this through STSADM commands?

I would stick the following line after after each command: stsadm -o execadmsvcjobs

This will make sure processing for previous commands is done before moving on.

If thats way off then I would think its something to do with: a) The way you're activating the feature... if you're using feature stapling, are you sure that the latest version of your stapling mechanism is in place?! b) Assuming you have some sort of feature receiver in your code behind. Are you sure there isn't an error occurring thats being hidden by a try catch? If there is then you need to see what the exception is...

If it works when you deactivate/activate the feature, that almost eliminates security issues.

Hope this helps..

Upvotes: 2

Related Questions