Custom Action URL Won’t Display for New Feature

I’m still in the habit of crafting my feature XML files by hand since it’s all quite new to me.  I don’t want to rely on a front-end tool that does stuff I don’t understand (he said as he wrote a blog entry using a tool he does not understand).

Today, I was trying to add a custom action to the site settings but it just wouldn’t show up.  I could install the feature and see it in the site features, but when I activated it (without error) it simply wouldn’t show up on the drop-down menu.

I finally realized that I misspelled "SharePoint" in the Location attribute of the <CustomAction> node.  This is the bad elements.xml file:

<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction
 Id="SiteActionsToolbar"
 GroupId="SiteActions"
 Location="Microsoft.Sharepoint.StandardMenu"
 Sequence="100"
 Title="Hello!"
 Description="Custom menu action added via a feature."
 ImageUrl="_layouts/images/menuprofile.gif">

    <UrlAction Url="http://www.xyzzy.com"/>

  </CustomAction>
</Elements>

 

Good:

<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction
 Id="SiteActionsToolBar"
 GroupId="SiteActions"
 Location="Microsoft.SharePoint.StandardMenu"
 Sequence="100"
 Title="Hello!"
 Description="Custom menu action added via a feature."
    >
    <UrlAction Url="http://www.xyzzy.com"/>
  </CustomAction>
</Elements>

That one took me a good two hours to figure out 🙂

I take solace in the fact that some day in the future, I’ll be able to say with conviction, "back in the day, I had to walk three miles up hill in the snow (barefoot!) in order to deploy a custom feature to MOSS.  You kids, you don’t know how easy you have it!  Get off my lawn!"

Can’t wait.

</end>

Technorati Tags: ,

4 thoughts on “Custom Action URL Won’t Display for New Feature

  1. David Remillard
    Thanks a lot!  This one got me, too!  Found your post after wasting a bunch of time.  Thanks for posting!  Dave.
    Reply
  2. No name
    Thank you! Thank you! Thank you!
     
    It took me litteraly 3 hours until i found your website and saw that indeed i spelled Sharepoint wrong. Why the hell is it "SharePoint"?!?!
     
    anyways thanks a lot man!
    Reply

Leave a Reply to David Remillard Cancel reply

Your email address will not be published. Required fields are marked *