'Unable to Locate JIRA Server For This Macro' displayed after changing JIRA Application Link name

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

問題

When trying to view a page with a JIRA Issues macro, instead of JIRA content, the following message appears:

Error rendering macro 'jira' : Unable to locate JIRA server for this macro. It may be due to Application Link configuration.

原因

After changing the JIRA Application Link name, Confluence did not update the page content to reflect the new name, breaking the links and generating the above message.

On later versions of Confluence, this could be due to the change in JIRA's serverID, example:

<ac:parameter ac:name="serverId">0df2b677-789b-32fa-a28e-b970cc2ea317</ac:parameter>

 

ソリューション

  • Backup your Confluence database
  • Confluence をシャットダウンします。
  • Run the following SQL statement, which will replace all existing references to the JIRA Application link with the new name. Ensure you replace OLD_LINK_NAME and NEW_LINK_NAME with the appropriate values

    UPDATE bodycontent
    SET body = Replace(body, '<ac:parameter ac:name="server">OLD_LINK_NAME</ac:parameter>', '<ac:parameter ac:name="server">NEW_LINK_NAME</ac:parameter>')
    WHERE body LIKE '%<ac:parameter ac:name="server">OLD_LINK_NAME</ac:parameter>%';
  • Confluence を再起動します。
  • Rename the Application link to the new name.

In case the above does not resolve the issue:

  1. Insert a new JIRA macro to the affected page
  2. Make sure that the new macro works (if that's the case, then this KB is applicable)
  3. Look for the new macro's serverID and compare it to the old one (via the page's Storage Format). Example:
    New Macro:

    <ac:parameter ac:name="serverId">d8d416ca-1f70-3b24-8a64-16cc111e7b15</ac:parameter>


    Old Macro:

    <ac:parameter ac:name="serverId">0df2b677-789b-32fa-a28e-b970cc2ea317</ac:parameter>
  4. Take note of the new and old serverIDs, then take a backup of the Confluence DB, before running this:

    UPDATE bodycontent
    SET body = Replace(body, '<ac:parameter ac:name="serverId">OLD_ID</ac:parameter>', '<ac:parameter ac:name="serverId">NEW_ID</ac:parameter>')
    WHERE body LIKE '%<ac:parameter ac:name="serverId">OLD_ID</ac:parameter>%';

     

    例:

    UPDATE bodycontent
    SET body = Replace(body, '<ac:parameter ac:name="serverId">0df2b677-789b-32fa-a28e-b970cc2ea317</ac:parameter>', '<ac:parameter ac:name="serverId">d8d416ca-1f70-3b24-8a64-16cc111e7b15</ac:parameter>')
    WHERE body LIKE '%<ac:parameter ac:name="serverId">0df2b677-789b-32fa-a28e-b970cc2ea317</ac:parameter>%';

最終更新日 2016 年 4 月 7 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.