SPC155701: Reference 15 hive in all images in CustomAction

A CustomAction can reference several images (like icons). Ensure that the URLs for these images points to the 15 hive.

TypeName: Reference15HiveInURLsInCustomAction
CheckId: SPC155701
Severity: Warning
Type: CustomActionDefinition
Resolution

Replace all references to images in CustomAction with an URLs which points to the 15 hive. See sample below:

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
   <CustomAction Id="Ribbon.Library.Actions.ReplacementButton"
      Location="CommandUI.Ribbon"
      RegistrationId="101"
      RegistrationType="List"
      Title="Replace a Ribbon Button">
      <CommandUIExtension>
         <CommandUIDefinitions>
            <CommandUIDefinition Location="Ribbon.Library.Actions.ConnectToClient">
               <Button Id="Ribbon.Library.Actions.ConnectToClient.ReplacementButton"
                  Command="ReplacementButtonCommand"
                  Image16by16="~site/_layouts/15/images/icons/Icon16.png"
                  Image32by32="~site/_layouts/15/images/icons/Icon32.png"
                  LabelText="Replaced Button"
                  TemplateAlias="o2" />
            </CommandUIDefinition>
         </CommandUIDefinitions>
         ...
      </CommandUIExtension>
   </CustomAction>
</Elements>

comments powered by Disqus