I followed the example for creating a custom ribbon tab, group and button here:
I am trying to add an additional group and button to the tab. The second group header is displayed but the button is not displayed in the second group.
Here is the code:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction Id="myproj.CustomTab" Location="CommandUI.Ribbon" RegistrationId="0x01001ED90B4B48B367428F2E0269B7E2604F" RegistrationType="ContentType">
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition Location="Ribbon.Tabs._children">
<Tab Id="myproj.CustomTab" Title="myproj"
Description="Demo tab for Chapter 3" Sequence="501">
<Scaling Id="myproj.CustomTab.Scaling">
<MaxSize Id="myproj.FirstDemoGroup.MaxSize"
GroupId="myproj.FirstDemoGroup"
Size="OneLarge"/>
<Scale Id="myproj.FirstDemoGroup.Scaling.CustomTabScaling"
GroupId="myproj.FirstDemoGroup"
Size="OneMedium" />
</Scaling>
<Groups Id="myproj.Groups">
<Group Id="myproj.FirstDemoGroup"
Description="Contains Demo controls"
Title="Demo Group"
Sequence="52"
Template="Ribbon.Templates.SingleButton">
<Controls Id="myproj.FirstDemoGroup.Controls">
<Button Id="myproj.FirstDemoGroup.HelloWorld" Command="MyCommand" Sequence="15" Image16by16="/_layouts/images/NoteBoard_16x16.png"
Image32by32="/_layouts/images/NoteBoard_32x32.png" Description="Displays a Hello World message" LabelText="Hello World" TemplateAlias="c1"/>
</Controls>
</Group>
<Group Id="myproj.SecondDemoGroup"
Description="Contains Demo controls"
Title="Demo Group2"
Sequence="52"
Template="Ribbon.Templates.SingleButton">
<Controls Id="myproj.SecondDemoGroup.Controls">
<Button Id="myproj.SecondDemoGroup.HelloWorld" Command="MyCommand" Sequence="15" Image16by16="/_layouts/images/NoteBoard_16x16.png"
Image32by32="/_layouts/images/NoteBoard_32x32.png" Description="Displays a Hello World message" LabelText="Hello World" TemplateAlias="c1"/>
</Controls>
</Group>
</Groups>
</Tab>
</CommandUIDefinition>
<CommandUIDefinition Location="Ribbon.Templates._children">
<GroupTemplate Id="Ribbon.Templates.SingleButton">
<Layout Title="OneLarge" LayoutTitle="OneLarge">
<Section Alignment="Top" Type="OneRow">
<Row>
<ControlRef DisplayMode="Large" TemplateAlias="c1" />
</Row>
</Section>
</Layout>
<Layout Title="OneMedium" LayoutTitle="OneMedium">
<Section Alignment="Top" Type="OneRow">
<Row>
<ControlRef DisplayMode="Medium" TemplateAlias="c1" />
</Row>
</Section>
</Layout>
</GroupTemplate>
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler
Command="MyCommand"
CommandAction="javascript: alert('Hello World'); " />
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
</Elements>