amira
amira

Reputation: 27

Taskpane is not updated upon clicking a ribbon button Word for mac

I have developed a sample Word Add-in with many Buttons in the Ribbon. On the click of the first button, an HTML page is getting displayed in the Task Pane. On the click of any other button, the contents of the task pane are getting updated (another HTML page is getting rendered).

The add-in was working fine for the older version of word 2016 for Mac until I updated it to 16.9 After updating, clicking any other ribbon Button no longer updates the page in the Task Pane.

Is there any change that I need to make in the manifest to make sure that the add-in works properly in the latest version of word 2016 for Mac?

this is the full manifest file

<?xml version="1.0" encoding="utf-8"?>
<!--Published:70EDFC97-B41D-43C5-B751-7C00AD999804-->
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="TaskPaneApp">

  <!-- See https://github.com/OfficeDev/Office-Add-in-Commands-Samples for documentation-->

  <!-- BeginBasicSettings: Add-in metadata, used for all versions of Office unless override provided -->

  <!--IMPORTANT! Id must be unique for your add-in. If you clone this manifest ensure that you change this id to your own GUID -->
  <Id>13a38f35-6020-4f66-b4af-54801e25c68d</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>ProNet</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <!-- The display name of your add-in. Used on the store and various placed of the Office UI such as the add-ins dialog -->
  <DisplayName DefaultValue="RealDocs" />
  <Description DefaultValue="Click the ProNet button to get started" />
  <!--Icon for your add-in. Used on installation screens and the add-ins dialog -->
  <IconUrl DefaultValue="https://realdocs.pronetcre.com/Images/ProNet_logo.png" />

  <!--BeginTaskpaneMode integration. Office 2013 and any client that doesn't understand commands will use this section.
    This section will also be used if there are no VersionOverrides -->
  <Hosts>
    <Host Name="Document" />
  </Hosts>
  <DefaultSettings>
    <SourceLocation DefaultValue="https://realdocs.pronetcre.com/OpenLanguageLibraries.html" />
  </DefaultSettings>
  <!--EndTaskpaneMode integration -->

  <Permissions>ReadWriteDocument</Permissions>

  <!--BeginAddinCommandsMode integration-->
  <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Hosts>
      <!--Each host can have a different set of commands. Cool huh!? -->
      <!-- Workbook=Excel Document=Word Presentation=PowerPoint -->
      <!-- Make sure the hosts you override match the hosts declared in the top section of the manifest -->
      <Host xsi:type="Document">
        <!-- Form factor. Currenly only DesktopFormFactor is supported. We will add TabletFormFactor and PhoneFormFactor in the future-->
        <DesktopFormFactor>

          <!--GetStarted information used on the callout that appears when installing the add-in. 
            Ensure you have build 16.0.6769 or above for GetStarted section to work-->
          <GetStarted>
            <!--Title of the Getting Started callout. resid points to a ShortString resource -->
            <Title resid="Contoso.GetStarted.Title" />

            <!--Description of the Getting Started callout. resid points to a LongString resource -->
            <Description resid="Contoso.GetStarted.Description" />

            <!--Not used right now but you need to provide a valid resource. We will add code in the future to consume this URL. 
                            resid points to a Url resource -->
            <LearnMoreUrl resid="Contoso.GetStarted.LearnMoreUrl" />
          </GetStarted>

          <!--Function file is an html page that includes the javascript where functions for ExecuteAction will be called. 
            Think of the FunctionFile as the "code behind" ExecuteFunction-->
          <FunctionFile resid="Contoso.FunctionFile.Url" />

          <!--PrimaryCommandSurface==Main Office Ribbon-->
          <ExtensionPoint xsi:type="PrimaryCommandSurface">
            <!--Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab -->
            <!-- Documentation includes all the IDs currently tested to work -->
            <CustomTab id="Contoso.Tab1">
              <!--Group ID-->
              <Group id="Contoso.Tab1.Group1">
                <!--Label for your group. resid must point to a ShortString resource -->
                <Label resid="Contoso.Tab1.Group1Label" />
                <Icon>
                  <!-- Sample Todo: Each size needs its own icon resource or it will look distorted when resized -->
                  <!--Icons. Required sizes 16,31,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX -->
                  <!--Use PNG icons and remember that all URLs on the resources section must use HTTPS -->
                  <bt:Image size="16" resid="Contoso.tpicon1_16x16" />
                  <bt:Image size="32" resid="Contoso.tpicon1_32x32" />
                  <bt:Image size="80" resid="Contoso.tpicon1_80x80" />
                </Icon>

                <!--Control. It can be of type "Button" or "Menu" -->
                <Control xsi:type="Button" id="Contoso.TaskpaneButton1">
                  <Label resid="Contoso.TaskpaneButton1.Label" />
                  <Supertip>
                    <Title resid="Contoso.TaskpaneButton1.Label" />
                    <Description resid="Contoso.TaskpaneButton1.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Contoso.tpicon1_16x16" />
                    <bt:Image size="32" resid="Contoso.tpicon1_32x32" />
                    <bt:Image size="80" resid="Contoso.tpicon1_80x80" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <TaskpaneId>MainTaskPane</TaskpaneId>
                    <!--Provide a url resource id for the location that will be displayed on the task pane -->
                    <SourceLocation resid="Contoso.Taskpane1.Url" />
                  </Action>
                </Control>




              </Group>
              <Group id="Contoso.Tab1.Group2">
                <!--Label for your group. resid must point to a ShortString resource -->
                <Label resid="Contoso.Tab1.Group2Label" />
                <Icon>
                  <!-- Sample Todo: Each size needs its own icon resource or it will look distorted when resized -->
                  <!--Icons. Required sizes 16,31,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX -->
                  <!--Use PNG icons and remember that all URLs on the resources section must use HTTPS -->
                  <bt:Image size="16" resid="Contoso.tpicon2_16x16" />
                  <bt:Image size="32" resid="Contoso.tpicon2_32x32" />
                  <bt:Image size="80" resid="Contoso.tpicon2_80x80" />
                </Icon>


                <Control xsi:type="Button" id="Contoso.TaskpaneButton2">
                  <!--Label for your button. resid must point to a ShortString resource -->
                  <Label resid="Contoso.TaskpaneButton2.Label" />
                  <Supertip>
                    <!--ToolTip title. resid must point to a ShortString resource -->
                    <Title resid="Contoso.TaskpaneButton2.Label" />
                    <!--ToolTip description. resid must point to a LongString resource -->
                    <Description resid="Contoso.TaskpaneButton2.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Contoso.tpicon2_16x16" />
                    <bt:Image size="32" resid="Contoso.tpicon2_32x32" />
                    <bt:Image size="80" resid="Contoso.tpicon2_80x80" />
                  </Icon>
                  <!--This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFuncion or ShowTaskpane-->
                  <!--Look at the FunctionFile.html page for reference on how to implement the function -->
                  <Action xsi:type="ShowTaskpane">
                    <TaskpaneId>MainTaskPane</TaskpaneId>
                    <!--Provide a url resource id for the location that will be displayed on the task pane -->
                    <SourceLocation resid="Contoso.Taskpane2.Url" />
                  </Action>
                </Control>
                <Control xsi:type="Button" id="Contoso.TaskpaneButton3">
                  <!--Label for your button. resid must point to a ShortString resource -->
                  <Label resid="Contoso.TaskpaneButton3.Label" />
                  <Supertip>
                    <!--ToolTip title. resid must point to a ShortString resource -->
                    <Title resid="Contoso.TaskpaneButton3.Label" />
                    <!--ToolTip description. resid must point to a LongString resource -->
                    <Description resid="Contoso.TaskpaneButton2.Tooltip" />
                  </Supertip>
                  <Icon>
                   <bt:Image size="16" resid="Contoso.tpicon3_16x16" />
                  <bt:Image size="32" resid="Contoso.tpicon3_32x32" />
                  <bt:Image size="80" resid="Contoso.tpicon3_80x80" />
                  </Icon>
                  <!--This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFuncion or ShowTaskpane-->
                  <!--Look at the FunctionFile.html page for reference on how to implement the function -->
                  <Action xsi:type="ShowTaskpane">
                    <TaskpaneId>MainTaskPane</TaskpaneId>
                    <!--Provide a url resource id for the location that will be displayed on the task pane -->
                    <SourceLocation resid="Contoso.Taskpane3.Url" />
                  </Action>
                </Control>
                <Control xsi:type="Button" id="Contoso.TaskpaneButton4">
                  <!--Label for your button. resid must point to a ShortString resource -->
                  <Label resid="Contoso.TaskpaneButton4.Label" />
                  <Supertip>
                    <!--ToolTip title. resid must point to a ShortString resource -->
                    <Title resid="Contoso.TaskpaneButton4.Label" />
                    <!--ToolTip description. resid must point to a LongString resource -->
                    <Description resid="Contoso.TaskpaneButton4.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Contoso.tpicon4_16x16" />
                  <bt:Image size="32" resid="Contoso.tpicon4_32x32" />
                  <bt:Image size="80" resid="Contoso.tpicon4_80x80" />
                  </Icon>
                  <!--This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFuncion or ShowTaskpane-->
                  <!--Look at the FunctionFile.html page for reference on how to implement the function -->
                  <Action xsi:type="ShowTaskpane">
                    <TaskpaneId>MainTaskPane</TaskpaneId>
                    <!--Provide a url resource id for the location that will be displayed on the task pane -->
                    <SourceLocation resid="Contoso.Taskpane4.Url" />
                  </Action>
                </Control>

              </Group>
              <Group id="Contoso.Tab1.Group3">
                <!--Label for your group. resid must point to a ShortString resource -->
                <Label resid="Contoso.Tab1.Group3Label" />
                <Icon>
                  <!-- Sample Todo: Each size needs its own icon resource or it will look distorted when resized -->
                  <!--Icons. Required sizes 16,31,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX -->
                  <!--Use PNG icons and remember that all URLs on the resources section must use HTTPS -->
                   <bt:Image size="16" resid="Contoso.tpicon5_16x16" />
                    <bt:Image size="32" resid="Contoso.tpicon5_32x32" />
                    <bt:Image size="80" resid="Contoso.tpicon5_80x80" />
                </Icon>

                <Control xsi:type="Button" id="Contoso.TaskpaneButton5">
                  <!--Label for your button. resid must point to a ShortString resource -->
                  <Label resid="Contoso.TaskpaneButton5.Label" />
                  <Supertip>
                    <!--ToolTip title. resid must point to a ShortString resource -->
                    <Title resid="Contoso.TaskpaneButton5.Label" />
                    <!--ToolTip description. resid must point to a LongString resource -->
                    <Description resid="Contoso.TaskpaneButton5.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Contoso.tpicon5_16x16" />
                    <bt:Image size="32" resid="Contoso.tpicon5_32x32" />
                    <bt:Image size="80" resid="Contoso.tpicon5_80x80" />
                  </Icon>
                  <!--This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFuncion or ShowTaskpane-->
                  <!--Look at the FunctionFile.html page for reference on how to implement the function -->
                    <Action xsi:type="ShowTaskpane">
                    <TaskpaneId>MainTaskPane</TaskpaneId>
                    <!--Provide a url resource id for the location that will be displayed on the task pane -->
                    <SourceLocation resid="Contoso.Taskpane5.Url" />
                  </Action>
                </Control>

              </Group>



              <!-- Label of your tab -->
              <!-- If validating with XSD it needs to be at the end, we might change this before release -->
              <Label resid="Contoso.Tab1.TabLabel" />
            </CustomTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>
    <Resources>
      <bt:Images>
        <bt:Image id="Contoso.tpicon1_16x16" DefaultValue="https://realdocs.pronetcre.com/Images/ProNet_logo16x16.png" />
        <bt:Image id="Contoso.tpicon1_32x32" DefaultValue="https://realdocs.pronetcre.com/Images/ProNet_logo32x32.png" />
        <bt:Image id="Contoso.tpicon1_80x80" DefaultValue="https://realdocs.pronetcre.com/Images/ProNet_logo80x80.png" />
        <bt:Image id="Contoso.tpicon2_16x16" DefaultValue="https://realdocs.pronetcre.com/Images/MyAgreements16x16.png" />
        <bt:Image id="Contoso.tpicon2_32x32" DefaultValue="https://realdocs.pronetcre.com/Images//MyAgreements32x32.png" />
        <bt:Image id="Contoso.tpicon2_80x80" DefaultValue="https://realdocs.pronetcre.com/Images//MyAgreements80x80.png" />
        <bt:Image id="Contoso.tpicon3_16x16" DefaultValue="https://realdocs.pronetcre.com/Images/CompanyAgreements16x16.png" />
        <bt:Image id="Contoso.tpicon3_32x32" DefaultValue="https://realdocs.pronetcre.com/Images/CompanyAgreements32x32.png" />
        <bt:Image id="Contoso.tpicon3_80x80" DefaultValue="https://realdocs.pronetcre.com/Images/CompanyAgreements80x80.png" />
        <bt:Image id="Contoso.tpicon4_16x16" DefaultValue="https://realdocs.pronetcre.com/Images/RealDocs16x16.png" />
        <bt:Image id="Contoso.tpicon4_32x32" DefaultValue="https://realdocs.pronetcre.com/Images/RealDocs32x32.png" />
        <bt:Image id="Contoso.tpicon4_80x80" DefaultValue="https://realdocs.pronetcre.com/Images/RealDocs80x80.png" />
        <bt:Image id="Contoso.tpicon5_16x16" DefaultValue="https://realdocs.pronetcre.com/Images/SwitchAccount16x16.png" />
        <bt:Image id="Contoso.tpicon5_32x32" DefaultValue="https://realdocs.pronetcre.com/Images/SwitchAccount32x32.png" />
        <bt:Image id="Contoso.tpicon5_80x80" DefaultValue="https://realdocs.pronetcre.com/Images/SwitchAccount80x80.png" />
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Contoso.FunctionFile.Url" DefaultValue="https://realdocs.pronetcre.com/SwitchAccountFunction.html" />
      <bt:Url id="Contoso.Taskpane1.Url" DefaultValue="https://realdocs.pronetcre.com/OpenLanguageLibraries.html?Dialog=1" />
        <bt:Url id="Contoso.Taskpane2.Url" DefaultValue="https://realdocs.pronetcre.com/OpenLanguageLibraries.html?Dialog=2" />
        <bt:Url id="Contoso.Taskpane3.Url" DefaultValue="https://realdocs.pronetcre.com/OpenLanguageLibraries.html?Dialog=3" />
        <bt:Url id="Contoso.Taskpane4.Url" DefaultValue="https://realdocs.pronetcre.com/OpenLanguageLibraries.html?Dialog=4" />
        <bt:Url id="Contoso.Taskpane5.Url" DefaultValue="https://realdocs.pronetcre.com/OpenLanguageLibraries.html?Dialog=5" />

        <!--LearnMore URL currently not used -->
        <bt:Url id="Contoso.GetStarted.LearnMoreUrl" DefaultValue="https://commandsimple.azurewebsites.net/GetStarted.html">
        </bt:Url>
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="Contoso.Tab1.TabLabel" DefaultValue="ProNet" />
        <bt:String id="Contoso.Tab1.Group1Label" DefaultValue="Language Bar" />

         <bt:String id="Contoso.Tab1.Group2Label" DefaultValue="Documents" />
         <bt:String id="Contoso.Tab1.Group3Label" DefaultValue="Group" />
        <bt:String id="Contoso.TaskpaneButton1.Label" DefaultValue="Open Language Libraries" />


        <bt:String id="Contoso.TaskpaneButton2.Label" DefaultValue="My Agreements" />
         <bt:String id="Contoso.TaskpaneButton3.Label" DefaultValue="Company Agreements" />
        <bt:String id="Contoso.TaskpaneButton4.Label" DefaultValue="RealDocs by ProNet" />
        <bt:String id="Contoso.TaskpaneButton5.Label" DefaultValue="Switch Account" />

      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="Contoso.TaskpaneButton1.Tooltip" DefaultValue="Click to open language library" />

        <bt:String id="Contoso.TaskpaneButton2.Tooltip" DefaultValue="Click to open My Agreements" />
         <bt:String id="Contoso.TaskpaneButton3.Tooltip" DefaultValue="Click to open Company Agreements" />
        <bt:String id="Contoso.TaskpaneButton4.Tooltip" DefaultValue="Click to open RealDocs by ProNet" />
        <bt:String id="Contoso.TaskpaneButton5.Tooltip" DefaultValue="Click to Switch Account" />
      </bt:LongStrings>
    </Resources>
  </VersionOverrides>
</OfficeApp>

Upvotes: 1

Views: 414

Answers (1)

Kim Brandl
Kim Brandl

Reputation: 13500

Since the XML you posted doesn't include the values of Contoso.Taskpane2.Url, Contoso.Taskpane3.Url, and Contoso.Taskpane4.Url, I can't answer with certainty -- but based on the scenario you've described and given that you observed this behavior change when you upgraded to 16.9, I suspect that your problem may be related to the issue described here: https://github.com/OfficeDev/office-js/issues/59. That is:

There was a change that caused Mac to be more strict on app domain format, iOS is also using this same validation for some time. If you remove the last "/" character in your app domain, the navigation should work.

Although this issue was specifically logged about the AppDomain URL, it seems like it could apply to other URLs as well (although I'm not entirely sure). Do your button URLs happen to end in /? If so, I'd suggest that you try removing / from the end of each URL to see if that resolves your issue.

Upvotes: 1

Related Questions