Custom ribbon button in SharePoint 2010 displays as disabled

I created a custom ribbon button that displays only the Insert block for a blog post. In my Dev environment, this is clearly visible. When I deploy to another environment, it appears, but turns off. I canโ€™t figure out how to enable it.

The button is enabled and available in my dev environment

alt text

The button is disabled in another environment where I am the site collection administrator.

alt text

It states that this is most likely security, or that you have something selected that is not in context. I am the administrator of the site collection, so I donโ€™t think itโ€™s security, and I chose the Rich text area, so Iโ€™m not sure about the context of the object.

: " ", , cmdui.xml. ?

:

 <?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction
  Id="CommandUI.Ribbon.EditingTools.BlogSiteMediaButton"
  RegistrationType="ContentType"
  RegistrationId="0x0110"
  Location="CommandUI.Ribbon">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.EditingTools.CPInsert.Media.Controls._children">
          <Button
            Id="Ribbon.EditingTools.CPInsert.Media.Controls.BlogSiteMediaButton"
            ToolTipTitle="Video"
            ToolTipDescription="Insert a video onto the page."
            Sequence="15"
            Image32by32="/_layouts/images/lg_ICWMD.gif"
            Image16by16="/_layouts/images/lg_ICWMD.gif"
            Command="BlogSite_Media_Button"
            LabelText="Insert Video"
            TemplateAlias="o1" />
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
          Command="BlogSite_Media_Button"
          CommandAction="javascript:OpenInsertMediaDialog();" />
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>
  <CustomAction Id="Ribbon.EditingTools.CPInsert.Actions.Scripts"
   Location ="ScriptLink"
   ScriptSrc="/_layouts/BlogSite.MediaButton/BlogSite.Ribbon.InsertMedia.js" />
</Elements>
+3
1

, . , , RTM. , , - -. ! - SharePoint, โ€‹โ€‹ RTM. . .

+2

Source: https://habr.com/ru/post/1760291/


All Articles