Hi All,
I've got a bizarre problem which is really confusing me and I'm hoping somebody could help please?
I've created a very simple Sandboxed solution in VS2012 - empty SharePoint Project with one empty element and in that element's XML, I have the following within the <Elements/> tags :
<CustomAction Id="Steve.AltLogin"
GroupId="PersonalActions"
Location="Microsoft.SharePoint.StandardMenu"
Sequence="100"
Title="Sign in as a Different User"
Description="Login with a different account.">
<UrlAction Url="javascript:window.navigate(SP.Utilities.Utility.getLayoutsPageUrl('CloseConnection.aspx?loginasanotheruser=true&Source={SiteUrl}'));"/>
</CustomAction>
If I right-click and deploy, it gets uploaded to the solution gallery and activates, and immediately I have the new custom action in my menu under my name to enable me to login as another user (I know I could have modified welcome.ascx to achieve the same but wanted something that wouldn't break in the event of a platform upgrade).
Now ... if I go to the solution gallery and deactivate it, the menu option disappears as expected.
If I reactivate from the solution gallery, the menu DOES NOT reappear. Similarly, if I upload the .wsp as a virgin solution and activate, it doesn't function and the only way it will work (seemingly) - is a direct deploy from Visual Studio.
I noted that the feature is scoped to Web and I'm deploying to my top level site in the site collection.
If I change the scope to "Site" - everything works as expected and I can activate / deactivate / reactivate to my heart's content with the expected results. Similarly - I can upload the .wsp to another farm via the solution gallery and the custom menu action appears.
Am I missing something here or is there a "bug" with a feature scoped to "Web" not working via the solutions gallery?
Thanks
Steve