![](/img/trans.png)
[英]Does Atlassian Confluence have local documentation for non-Internet installs
[英]Atlassian Confluence Blueprint wizard - Non existent soy template
我正在构建一个融合插件,包括带有蓝图的蓝图向导对话框。 但是当我尝试加载向导时,浏览器控制台中出现 JS 错误,
未捕获的错误向导指向一个不存在的 Soy 模板,OutputPlugin.Blueprints.Simple.page1Form'。 检查您的网络资源或服务器日志。
我尝试过的是,
但是,我已经在atlassian-plugin.xml
文件atlassian-plugin.xml
大豆添加到网络资源中。
我跟着atlassian confluence插件教程“ 写一个中级蓝图插件”
我使用的是 Confluence 6.14.0 和 atlasisian SDK 8.16.0
atlassian-plugin.xml
<web-resource key="ma2.create_wizard-resources" name="ma2.create_wizard Web Resources">
...
<transformation extension="soy">
<transformer key="soyTransformer">
<functions>com.atlassian.confluence.plugins.soy:soy-core-functions
</functions>
</transformer>
</transformation>
...
<resource type="download" name="outputTemplate.soy.js" location="/soy/outputTemplate.soy" />
</web-resource>
<blueprint key="output-blueprint" content-template-key="output-template" index-key="output-index" i18n-name-key="output.blueprint.name">
<content-template ref="output-template"/>
<dialog-wizard key="outputTemplate-wizard">
<dialog-page id="page1Id"
template-key="OutputPlugin.Blueprints.Simple.page1Form"
title-key="output.blueprint.wizard.page1.title"
description-header-key="test"
description-content-key="test1"
last="true"/>
</dialog-wizard>
</blueprint>
outputTemplate.soy
{namespace OutputPlugin.Blueprints.Simple}
/**
* A form that accepts a person's name
*/
{template .page1Form}
<form action="#" method="post" class="aui">
<fieldset>
<div class="field-group">
<label for="contentvar">{getText('output.blueprint.form.label.title.vName')}</label>
<input id="contentvar" class="text" type="text" name="contentVar">
</div>
</fieldset>
</form>
{/template}
终于找到了解决办法。 第一个问题是我的服务器控制台没有记录必要的日志。 只有 java jdk 和同步日志。 所以我配置了这个Confluence 支持页面中提到的日志,以包含“com.atlassian.confluence.core”的所有日志。 然后我发现了错误
[INFO] [talledLocalContainer] com.atlassian.soy.impl.QuieterSoySyntaxException:在文件 /soy/outputTemplate.soy:SoyDoc 的结尾不在行的结尾 [第 4 行,第 1 列]。
最后,问题是大豆文档结束后的空格。
/**
* A form that accepts a person's name
*/{space}
代替
/**
* A form that accepts a person's name
*/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.