Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am in big trouble. I have created two ribbons and both doesn't work. I allways get the following failure message:

System.ArgumentException: Ribbon <Tab> node must have a <Scaling> subnode.

I have already created the ribbon more than once, followed tutorials and howto's. But I don't know whats wrong. I have a scaling tag and I know, that the failure occures when I have problems with the size. But I have created a template for each Group in the tab.

Here is one of my code:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction Id="Ribbon.CateringService.TourenplanView.Calendar"
                Title="Tab for the tourenplan view."
                Location="CommandUI.Ribbon">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.Tabs._children">
          <Tab Id="Ribbon.CateringService.TourenplanView.Calendar"
               Title="Optionen"
               Description="Tab for the tourenplan view."
               Sequence="990">
            <Scaling Id="Ribbon.CateringService.TourenplanView.Calendar.Scaling">
              <MaxSize Id="Ribbon.CateringService.TourenplanView.Calendar.Views.MaxSize"
                       GroupId="Ribbon.CateringService.TourenplanView.Calendar.Views"
                       Size="ThreeLarge" />
              <MaxSize Id="Ribbon.CateringService.TourenplanView.Calendar.Allocations.MaxSize"
                       GroupId="Ribbon.CateringService.TourenplanView.Calendar.Allocations"
                       Size="FiveLarge" />
              <MaxSize Id="Ribbon.CateringService.TourenplanView.Calendar.Times.MaxSize"
                       GroupId="Ribbon.CateringService.TourenplanView.Calendar.Times"
                       Size="SixLarge" />
              <MaxSize Id="Ribbon.CateringService.TourenplanView.Calendar.Delete.MaxSize"
                       GroupId="Ribbon.CateringService.TourenplanView.Calendar.Delete"
                       Size="OneLarge" />
              <Scale Id="Ribbon.CateringService.TourenplanView.Calendar.Views.Scaling.CalendarScaling"
                     GroupId="Ribbon.CateringService.TourenplanView.Calendar.Views"
                     Size="ThreeLarge" />
              <Scale Id="Ribbon.CateringService.TourenplanView.Calendar.Allocations.Scaling.CalendarScaling"
                     GroupId="Ribbon.CateringService.TourenplanView.Calendar.Allocations"
                     Size="FiveLarge" />
              <Scale Id="Ribbon.CateringService.TourenplanView.Calendar.Times.Scaling.CalendarScaling"
                     GroupId="Ribbon.CateringService.TourenplanView.Calendar.Times"
                     Size="SixLarge" />
              <Scale Id="Ribbon.CateringService.TourenplanView.Calendar.Delete.Scaling.CalendarScaling"
                     GroupId="Ribbon.CateringService.TourenplanView.Calendar.Delete"
                     Size="OneLarge" />
            </Scaling>
            <Groups Id="Ribbon.CateringService.TourenplanView.Calendar.Groups">
              <!-- Views Group -->
              <Group Id="Ribbon.CateringService.TourenplanView.Calendar.Views"
                     Command="Ribbon.CateringService.TourenplanView.Calendar.Views"
                     Description="Contains view items"
                     Title="Ansichten"
                     Sequence="10"
                     Template="Ribbon.Templates.TourenplanView.Views">
                <Controls Id="Ribbon.CateringService.TourenplanView.Calendar.Views.Controls">
                  <Button Id="Ribbon.CateringService.TourenplanView.Calendar.Views.DayView"
                          Command="OpenDayView"
                          Sequence="10"
                          Image16by16="/_layouts/images/MAN/day.png"
                          Image32by32="/_layouts/images/MAN/day.png"
                          LabelText="Tag"
                          TemplateAlias="view1"/>
                  <Button Id="Ribbon.CateringService.TourenplanView.Calendar.Views.WeekView"
                          Command="OpenWeekView"
                          Sequence="20"
                          Image16by16="/_layouts/images/MAN/WorkingWeek.png"
                          Image32by32="/_layouts/images/MAN/WorkingWeek.png"
                          LabelText="Woche"
                          TemplateAlias="view2"/>
                  <Button Id="Ribbon.CateringService.TourenplanView.Calendar.Views.MonthView"
                          Command="OpenMonthView"
                          Sequence="30"
                          Image16by16="/_layouts/images/MAN/Month.png"
                          Image32by32="/_layouts/images/MAN/Month.png"
                          LabelText="Monat"
                          TemplateAlias="view3"/>
                </Controls>
              </Group>
              <!-- Allocations Group -->
              <Group Id="Ribbon.CateringService.TourenplanView.Calendar.Allocations"
                     Command="Ribbon.CateringService.TourenplanView.Calendar.Allocations"
                     Title="Tourenzuordnung"
                     Sequence="20"
                     Template="Ribbon.Templates.TourenplanView.Allocations">
                <Controls Id="Ribbon.CateringService.TourenplanView.Calendar.Allocations.Controls">
                  <Button Id="Ribbon.CateringService.TourenplanView.Calendar.Allocations.TourOne"
                          Command="AllocateToTour1"
                          Sequence="10"
                          Image16by16="/_layouts/images/GROUP.gif"
                          Image32by32="/_layouts/images/GROUP.gif"
                          LabelText="Tour 1"
                          TemplateAlias="allocation1"/>
                  <Button Id="Ribbon.CateringService.TourenplanView.Calendar.Allocations.TourTwo"
                          Command="AllocateToTour2"
                          Sequence="20"
                          Image16by16="/_layouts/images/GROUP.gif"
                          Image32by32="/_layouts/images/GROUP.gif"
                          LabelText="Tour 2"
                          TemplateAlias="allocation2"/>
                  <Button Id="Ribbon.CateringService.TourenplanView.Calendar.Allocations.TourThree"
                          Command="AllocateToTour3"
                          Sequence="30"
                          Image16by16="/_layouts/images/GROUP.gif"
                          Image32by32="/_layouts/images/GROUP.gif"
                          LabelText="Tour 3"
                          TemplateAlias="allocation3"/>
                  <Button Id="Ribbon.CateringService.TourenplanView.Calendar.Allocations.TourFour"
                          Command="AllocateToTour4"
                          Sequence="40"
                          Image16by16="/_layouts/images/GROUP.gif"
                          Image32by32="/_layouts/images/GROUP.gif"
                          LabelText="Tour 4"
                          TemplateAlias="allocation4"/>
                  <Button Id="Ribbon.CateringService.TourenplanView.Calendar.Allocations.TourFive"
                          Command="AllocateToTour5"
                          Sequence="50"
                          Image16by16="/_layouts/images/GROUP.gif"
                          Image32by32="/_layouts/images/GROUP.gif"
                          LabelText="Tour 5"
                          TemplateAlias="allocation5"/>
                </Controls>
              </Group>
              <!-- Times Group -->
              <Group Id="Ribbon.CateringService.TourenplanView.Calendar.Times"
                     Command="Ribbon.CateringService.TourenplanView.Calendar.Times"
                     Title="Minuten"
                     Sequence="30"
                     Template="Ribbon.Templates.TourenplanView.Times">
                <Controls Id="Ribbon.CateringService.TourenplanView.Calendar.Times.Controls">
                  <Button Id="Ribbon.CateringService.TourenplanView.Calendar.Times.PlusFive"
                          Command="PlusFiveMinutes"
                          Sequence="10"
                          Image16by16="/_layouts/images/create_upArrow.png"
                          Image32by32="/_layouts/images/create_upArrow.png"
                          LabelText="+5"
                          TemplateAlias="time1"/>
                  <Button Id="Ribbon.CateringService.TourenplanView.Calendar.Times.PlusTen"
                          Command="PlusTenMinutes"
                          Sequence="20"
                          Image16by16="/_layouts/images/create_upArrow.png"
                          Image32by32="/_layouts/images/create_upArrow.png"
                          LabelText="+10"
                          TemplateAlias="time2"/>
                  <Button Id="Ribbon.CateringService.TourenplanView.Calendar.Times.PlusFifteen"
                          Command="PlusFifteenMinutes"
                          Sequence="30"
                          Image16by16="/_layouts/images/create_upArrow.png"
                          Image32by32="/_layouts/images/create_upArrow.png"
                          LabelText="+15"
                          TemplateAlias="time3"/>
                  <Button Id="Ribbon.CateringService.TourenplanView.Calendar.Times.MinusFive"
                          Command="MinusFiveMinuts"
                          Sequence="40"
                          Image16by16="/_layouts/images/create_defaultDownArrow.png"
                          Image32by32="/_layouts/images/create_defaultDownArrow.png"
                          LabelText="-5"
                          TemplateAlias="time4"/>
                  <Button Id="Ribbon.CateringService.TourenplanView.Calendar.Times.MinusTen"
                          Command="MinusTenMinuts"
                          Sequence="50"
                          Image16by16="/_layouts/images/create_defaultDownArrow.png"
                          Image32by32="/_layouts/images/create_defaultDownArrow.png"
                          LabelText="-10"
                          TemplateAlias="time5"/>
                  <Button Id="Ribbon.CateringService.TourenplanView.Calendar.Times.MinusFifteen"
                          Command="MinusFifteenMinuts"
                          Sequence="60"
                          Image16by16="/_layouts/images/create_defaultDownArrow.png"
                          Image32by32="/_layouts/images/create_defaultDownArrow.png"
                          LabelText="-15"
                          TemplateAlias="time6"/>
                </Controls>
              </Group>
              <Group Id="Ribbon.CateringService.TourenplanView.Calendar.Remove"
                     Command="Ribbon.CateringService.TourenplanView.Calendar.Remove"
                     Title="Löschen"
                     Sequence="40"
                     Template="Ribbon.Templates.TourenplanView.Times">
                <Controls Id="Ribbon.CateringService.TourenplanView.Calendar.Remove.Controls">
                  <Button Id="Ribbon.CateringService.TourenplanView.Calendar.Remove.Delete"
                          Command="DeleteFromTour"
                          Sequence="10"
                          Image16by16="/_layouts/$Resources:core,Language;/images/formatmap16x16.png"
                          Image16by16Top="-112"
                          Image16by16Left="-224"
                          Image32by32="/_layouts/$Resources:core,Language;/images/formatmap32x32.png"
                          Image32by32Top="-128" 
                          Image32by32Left="-128"
                          LabelText="+5"
                          TemplateAlias="remove"/>
                </Controls>
              </Group>
            </Groups>
          </Tab>
        </CommandUIDefinition>
        <!-- Definition for the template for the Views Group. -->
        <CommandUIDefinition Location="Ribbon.Templates._children">
          <GroupTemplate Id="Ribbon.Templates.TourenplanView.Views">
            <Layout Title="ThreeLarge" LayoutTitle="ThreeLarge">
              <Section Alignment="Middle" Type="OneRow">
                <Row>
                  <ControlRef DisplayMode="Large" TemplateAlias="view1" />
                  <ControlRef DisplayMode="Large" TemplateAlias="view2" />
                  <ControlRef DisplayMode="Large" TemplateAlias="view3" />
                </Row>
              </Section>
            </Layout>
          </GroupTemplate>
        </CommandUIDefinition>
        <!-- Definition for the template for the Allocations group -->
        <CommandUIDefinition Location="Ribbon.Templates._children">
          <GroupTemplate Id="Ribbon.Templates.TourenplanView.Allocations">
            <Layout Title="FiveLarge" LayoutTitle="FiveLarge">
              <Section Alignment="Middle" Type="OneRow">
                <Row>
                  <ControlRef DisplayMode="Large" TemplateAlias="allocation1" />
                  <ControlRef DisplayMode="Large" TemplateAlias="allocation2" />
                  <ControlRef DisplayMode="Large" TemplateAlias="allocation3" />
                  <ControlRef DisplayMode="Large" TemplateAlias="allocation4" />
                  <ControlRef DisplayMode="Large" TemplateAlias="allocation5" />
                </Row>
              </Section>
            </Layout>
          </GroupTemplate>
        </CommandUIDefinition>
        <!-- Definition for the template for the Times group -->
        <CommandUIDefinition Location="Ribbon.Templates._children">
          <GroupTemplate Id="Ribbon.Templates.TourenplanView.Times">
            <Layout Title="SixLarge" LayoutTitle="SixLarge">
              <Section Alignment="Middle" Type="OneRow">
                <Row>
                  <ControlRef DisplayMode="Large" TemplateAlias="time1" />
                  <ControlRef DisplayMode="Large" TemplateAlias="time2" />
                  <ControlRef DisplayMode="Large" TemplateAlias="time3" />
                  <ControlRef DisplayMode="Large" TemplateAlias="time4" />
                  <ControlRef DisplayMode="Large" TemplateAlias="time5" />
                  <ControlRef DisplayMode="Large" TemplateAlias="time6" />
                </Row>
              </Section>
            </Layout>
          </GroupTemplate>
        </CommandUIDefinition>
        <!-- Definition for the template for the Delete group -->
        <CommandUIDefinition Location="Ribbon.Templates._children">
          <GroupTemplate Id="Ribbon.Templates.TourenplanView.Delete">
            <Layout Title="OneLarge" LayoutTitle="OneLarge">
              <Section Alignment="Middle" Type="OneRow">
                <Row>
                  <ControlRef DisplayMode="Large" TemplateAlias="remove" />
                </Row>
              </Section>
            </Layout>
          </GroupTemplate>
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler Command="OpenDayView"
                          CommandAction="javascript:function OpenDayView()
                                          {
                                            __doPostBack('DayViewPostback','');
                                            RefreshCommandUI();
                                          }
                                          OpenDayView();"
                          EnabledScript="True" />
        <CommandUIHandler Command="OpenWeekView"
                          CommandAction="javascript:function OpenWeekView()
                                          {
                                            __doPostBack('WeekViewPostback','');
                                            RefreshCommandUI();
                                          }
                                          OpenWeekView();"
                          EnabledScript="True" />
        <CommandUIHandler Command="OpenMonthView"
                          CommandAction="javascript:function OpenMonthView()
                                          {
                                            __doPostBack('MonthViewPostback','');
                                            RefreshCommandUI();
                                          }
                                          OpenMonthView();"
                          EnabledScript="True" />
        <CommandUIHandler Command="AllocateToTour1"
                          CommandAction="javascript:function AddToTourOne() {
                                          var argument = '1|' + GetSelectedItems();
                                          __doPostBack('AddToTourPostback', argument);
                                          RefreshCommandUI();
                                        }
                                        AddToTourOne();"
                          EnabledScript="True" />
        <CommandUIHandler Command="AllocateToTour2"
                          CommandAction="javascript:function AddToTourTwo() {
                                          var argument = '2|' + GetSelectedItems();
                                          __doPostBack('AddToTourPostback', argument);
                                          RefreshCommandUI();
                                        }
                                        AddToTourTwo();"
                          EnabledScript="True" />
        <CommandUIHandler Command="AllocateToTour3"
                          CommandAction="javascript:function AddToTourThree() {
                                          var argument = '3|' + GetSelectedItems();
                                          __doPostBack('AddToTourPostback', argument);
                                          RefreshCommandUI();
                                        }
                                        AddToTourThree();"
                          EnabledScript="True" />
        <CommandUIHandler Command="AllocateToTour4"
                          CommandAction="javascript:function AddToTourFour() {
                                          var argument = '4|' + GetSelectedItems();
                                          __doPostBack('AddToTourPostback', argument);
                                          RefreshCommandUI();
                                        }
                                        AddToTourFour();"
                          EnabledScript="True" />
        <CommandUIHandler Command="AllocateToTour5"
                          CommandAction="javascript:function AddToTourFive() {
                                          var argument = '5|' + GetSelectedItems();
                                          __doPostBack('AddToTourPostback', argument);
                                          RefreshCommandUI();
                                        }
                                        AddToTourFive();"
                          EnabledScript="True" />
        <CommandUIHandler Command="PlusFiveMinutes"
                          CommandAction="javascript:function IncreaseDeliveryTimeByFive() {
                                          var argument = '5|' + GetSelectedItems();
                                          __doPostBack('IncreaseDeliveryPostback', argument);
                                          RefreshCommandUI();
                                        }
                                        IncreaseDeliveryTimeByFive();"
                          EnabledScript="True" />
        <CommandUIHandler Command="PlusTenMinutes"
                          CommandAction="javascript:function IncreaseDeliveryTimeByTen() {
                                          var argument = '10|' + GetSelectedItems();
                                          __doPostBack('IncreaseDeliveryPostback', argument);
                                          RefreshCommandUI();
                                        }
                                        IncreaseDeliveryTimeByTen();"
                          EnabledScript="True" />
        <CommandUIHandler Command="PlusFifteenMinutes"
                          CommandAction="javascript:function IncreaseDeliveryTimeByFifteen() {
                                          var argument = '15|' + GetSelectedItems();
                                          __doPostBack('IncreaseDeliveryPostback', argument);
                                          RefreshCommandUI();
                                        }
                                        IncreaseDeliveryTimeByFifteen();"
                          EnabledScript="True" />
        <CommandUIHandler Command="MinusFiveMinutes"
                          CommandAction="javascript:function DecreaseDeliveryTimeByFive() {
                                          var argument = '5|' + GetSelectedItems();
                                          __doPostBack('DecreaseDeliveryPostback', argument);
                                          RefreshCommandUI();
                                        }
                                        DecreaseDeliveryTimeByTen();"
                          EnabledScript="True" />
        <CommandUIHandler Command="MinusTenMinutes"
                          CommandAction="javascript:function DecreaseDeliveryTimeByTen() {
                                          var argument = '10|' + GetSelectedItems();
                                          __doPostBack('DecreaseDeliveryPostback', argument);
                                          RefreshCommandUI();
                                        }
                                        DecreaseDeliveryTimeByTen();"
                          EnabledScript="True" />
        <CommandUIHandler Command="MinusFifteenMinutes"
                          CommandAction="javascript:function DecreaseDeliveryTimeByFifteen() {
                                          var argument = '15|' + GetSelectedItems();
                                          __doPostBack('DecreaseDeliveryPostback', argument);
                                          RefreshCommandUI();
                                        }
                                        DecreaseDeliveryTimeByFifteen();"
                          EnabledScript="True" />
        <CommandUIHandler Command="DeleteFromTour"
                          CommandAction="javascript: function DeleteItems() {
                                          var argument = GetSelectedItems();
                                          __doPostBack('DeletePostback', argument);
                                          RefreshCommandUI();
                                        }
                                        DeleteItems();"
                          EnabledScript="True" />
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>
</Elements>

Maybe someone knows what went wrong.

share|improve this question
    
Omlin Thx for the implementation of the code :) –  Smokefoot Jan 17 '12 at 15:29
add comment

2 Answers 2

You have the Id of one group set to Ribbon.CateringService.TourenplanView.Calendar.Remove, but the scaling elements points to Ribbon.CateringService.TourenplanView.Calendar.Delete. Remove vs Delete!

share|improve this answer
    
Ok, thank you for that but it havn't solved it. I checked all the id's and relations and now it seems to be right. But it doesn't work too :\ –  Smokefoot Jan 17 '12 at 15:46
    
Have you cleared the IE cache and everything. Start IE in In-Private mode and test it. –  Wictor Wilen MCA MCM MVP Jan 17 '12 at 16:13
add comment

make sure that your tab ID must be same as you refer in page load or init.That resolved my issue.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.