【问题标题】:Error creating a customContent on a confluence addon在 Confluence 插件上创建 customContent 时出错
【发布时间】:2017-08-08 12:37:06
【问题描述】:

今天我正在尝试为我的公司创建一个 Confluence 插件,我尝试关注 atlassian documents

我的问题是在向 atlassian-connect.json 添加新的 customContent 时尝试运行 express 应用程序,运行 npm start 后出现以下错误。

注册主机失败 https://admin:xxx@xxx.atlassian.net/wiki (200) {"type":"INSTALL","pingAfter":300,"status":{"done":true,"statusCode":200,"con tentType":"application/vnd.atl.plugins.task.install.err+json","subCode":"upm. pluginInstall.error.descriptor.not.from.marketplace","source":"https‍://1a0adc 8f.ngrok.io/atlassian-connect.json","名称":"https‍://1a0adc8f.ngrok.io/atlassi an-connect.json"},"links":{"self":"/wiki/rest/plugins/1.0/pending/b88594d3-c3 c2-4760-b687-c8d860c0a377","alternate":"/wiki/rest/plugins/1.0/tasks/b88594d3 -c3c2-4760-b687-c8d860c0a377"},"timestamp":1502272147602,"userKey":"xxx","id":"xxx"}
插件未注册;未检测到兼容主机

这是我的 atlassian-connect.json 文件:

{
"key": "my-add-on",
"name": "Ping Pong",
"description": "My very first add-on",
"vendor": {
    "name": "Angry Nerds",
    "url": "https://www.atlassian.com/angrynerds"
},
"baseUrl": "{{localBaseUrl}}",
"links": {
    "self": "{{localBaseUrl}}/atlassian-connect.json",
    "homepage": "{{localBaseUrl}}/atlassian-connect.json"
},
"authentication": {
    "type": "jwt"
},
"lifecycle": {
    "installed": "/installed"
},
"scopes": [
    "READ"
],
"modules": {
    "generalPages": [
        {
            "key": "hello-world-page-jira",
            "location": "system.top.navigation.bar",
            "name": {
                "value": "Hello World"
            },
            "url": "/hello-world",
            "conditions": [{
                "condition": "user_is_logged_in"
            }]
        },
        {
            "key": "customersViewer",
            "location": "system.header/left",
            "name": {
                "value": "Hello World"
            },
            "url": "/hello-world",
            "conditions": [{
                "condition": "user_is_logged_in"
            }]
        }
    ],
    "customContent": [
        {
            "key": "customer",
            "name": {
                "value": "Customers"
            },
            "uiSupport": {
                "contentViewComponent": {
                    "moduleKey": "customersViewer"
                },
                "listViewComponent": {
                    "moduleKey": "customerList"
                },
                "icons": {
                    "item": {
                        "url": "/images/customers.png"
                    }
                }
            },
            "apiSupport": {
                "supportedContainerTypes": ["space"]
            }
        }
    ]
}
}

有人知道发生了什么吗?

【问题讨论】:

  • 我认为这里的问题是您没有在 Confluence 的 Manage Add-Ons Settings 中启用开发模式。 https://[your_domain].atlassian.net/wiki/plugins/servlet/upm > 点击“设置”,勾选“启用开发模式”

标签: node.js atlassian-connect


【解决方案1】:

contentViewComponent 在 moduleKey 中找不到它所引用的 generalPage。

来自文档:

在上面的 sn-p 中,moduleKey “customersViewer” 映射到一个 我们在附加组件中定义的 generalPage 模块。这个generalPage是 传递我们指定的上下文参数,并可视化我们的内容 相应地。

如果您将带有密钥hello-world-page-confluence 的generalPage 更改为customersViewer,您就可以安装并启动并运行。

【讨论】:

  • 感谢您的回答,遗憾的是这对我不起作用,我已经更新了 atlassian-connect.json 文件和我原来帖子中的错误,我又做错了什么吗?跨度>
猜你喜欢
  • 2017-02-27
  • 2016-12-15
  • 2017-10-25
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-07-17
  • 2014-03-06
  • 1970-01-01
相关资源
最近更新 更多