SharePoint Ribbon Customization — object reference error: Microsoft.Web.CommandUI.RibbonRenderer.AllGroupsControlsTrimmed

Was getting this error all day:

System.NullReferenceException: Object reference not set to an instance of an object.    at Microsoft.Web.CommandUI.RibbonRenderer.AllGroupsControlsTrimmed(DataNode xn, RibbonRenderContext rrc)

And finally came across someone with an answer — you have to remove ALL COMMENTS from your CommandUIDefinition and CommandUIHandler

Never would have thought of that – hopefully helps someone else (or possibly Future Rich).

-Rich

3 thoughts on “SharePoint Ribbon Customization — object reference error: Microsoft.Web.CommandUI.RibbonRenderer.AllGroupsControlsTrimmed

  1. Thanks a lot. Removing the comments actually solved the issue and saved us a lot of time

Leave a Reply

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