【发布时间】:2018-02-05 20:19:11
【问题描述】:
我正在开发 Word Web 插件并面临功能区按钮图标问题;它没有出现。
我已经搜索了很多,并在这里看到了一些问题,但尽管如此,我已经通过了那里的所有建议,但它仍然不起作用。
我正在使用加载项命令,我只有一个功能区按钮,其图标指向我的服务器,而不是 https。我可以通过任何浏览器抓取图像。
有一些奇怪的事情:
图标在 Word Online 和 Word for Mac 中显示,但在 Word for Windows 中不。
如果我在本地启动服务器,它可以工作。
- 如果我将图标移动到另一个服务(例如
imugr.com),它也可以工作。 - 我服务器上的证书有效,没有警告/错误。
- 所有图标都是
PNG格式
这是我的清单:
<!-- from Group -->
<Control xsi:type="Button" id="TaskpaneButton">
<Label resid="TaskpaneButton.Label"/>
<Supertip>
<!-- ToolTip title. resid must point to a ShortString resource. -->
<Title resid="TaskpaneButton.Label"/>
<!-- ToolTip description. resid must point to a LongString resource. -->
<Description resid="TaskpaneButton.Tooltip"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="tpicon_16x16"/>
<bt:Image size="32" resid="tpicon_32x32"/>
<bt:Image size="80" resid="tpicon_80x80"/>
</Icon>
<!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. -->
<Action xsi:type="ShowTaskpane">
<TaskpaneId>ButtonId1</TaskpaneId>
<!-- Provide a url resource id for the location that will be displayed on the task pane. -->
<SourceLocation resid="Taskpane.Url"/>
</Action>
</Control>
<!-- from Resources -->
<bt:Images>
<bt:Image id="tpicon_16x16" DefaultValue="https://validurl.com/wa/Images/R16X16.png"/>
<bt:Image id="tpicon_32x32" DefaultValue="https://validurl.com/wa/Images/R32X32.png"/>
<bt:Image id="tpicon_80x80" DefaultValue="https://validurl.com/wa/Images/R80X80.png"/>
</bt:Images>
获取图像时的 HTTP 跟踪:
HTTP/1.1 200 OK
Date: Mon, 05 Feb 2018 22:51:38 GMT
Server: Jetty(9.3.11.v20160721)
Last-Modified: Mon, 05 Feb 2018 16:24:36 GMT
Content-Type: image/png
Accept-Ranges: bytes
Content-Length: 835
Vary: User-Agent
Cache-Control: no-cache, no-store, must-revalidate, private
Pragma: no-cache
Expires: 0
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Strict-Transport-Security: max-age=31536000; includeSubDomains
【问题讨论】:
-
能否为失败的场景添加 HTTP 流量?
-
感谢您的快速回复)另一边的码头服务器您的意思是来自它的日志,不是吗?或者在插入插件时尝试使用wireshark?
-
我正在寻找客户端上的流量,所以 WireShark 或 Fiddler 都可以解决问题。
-
fiddler 捕获我可以私下发给你吗?
-
HTTP/1.1 200 OK 日期:2018 年 2 月 5 日星期一 22:51:38 GMT 服务器:Jetty(9.3.11.v20160721) 最后修改时间:2018 年 2 月 5 日星期一 16:24:36 GMT Content-Type: image/png Accept-Ranges: bytes Content-Length: 835 Vary: User-Agent Cache-Control: no-cache, no-store, must-revalidate, private Pragma: no-cache Expires: 0 X-内容类型选项:nosniff X-XSS-保护:1;模式=阻止严格传输安全:最大年龄=31536000; includeSubDomains 对所有图标请求都是一样的答案link to pastebin
标签: office-js