无法加载资源:大豆模板{并非所有代码都使用Soy V 2语法(找到文件simple.soy不在Soy V2语法中)。 }

问题描述 投票:1回答:1

我的插件中有两个大豆模板,其中一个加载正常,但其他没有加载500内部服务器错误。我从控制台附加错误。

这是我的代码:

    {namespace JIRA.Templates.Impacttemplate.ImpactRow}

/**
 * Render the information page for the Requirement Template.

 * @param actor : string
   @param impact: string
 *

 */

{template .renderImpactRow}

<tr class="impact-soy" data-key="{$impact}" >

    /*<td><a href="#" id="button"><span class="key">{$productName}</span></a></td>*/
    <td><span class="key">{$impact}</span></td>
    <td><span class="name">{$actor}</span></td>

</tr>
{/template}
jira-plugin soy-templates atlassian-ui
1个回答
0
投票

最后我可以找出解决方案:

大豆文件评论后不应该有空白行。

@param impact: string should be like @param impact : string

这是实际的工作代码:

/**
 * Render the impact.
 * @param new_actor : string
 * @param impact : string
 */
{template .renderImpactRow}
<tr class="impact-soy" data-key="{$impact}" >

    <td><span class="key">{$impact}</span></td>
    <td><span class="name">{$new_actor}</span></td>
</tr>
{/template}
© www.soinside.com 2019 - 2024. All rights reserved.