画像が公開されていないため、ユーザー マクロのプレースホルダーを読み込めない

お困りですか?

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

コミュニティに質問

E

プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。

このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。

*Fisheye および Crucible は除く

問題

When inserting a user macro in the editor, the user macro place-holder would not load, and the page editor becomes unresponsive. The following stack trace can be seen in the logs:

atlassian-confluence.log に次のエラーが返される。

java.lang.NullPointerException
	at com.atlassian.confluence.tinymceplugin.placeholder.DefaultPlaceholderImageFactory.getIcon(DefaultPlaceholderImageFactory.java:188)
	at com.atlassian.confluence.tinymceplugin.placeholder.DefaultPlaceholderImageFactory.getPlaceholderImage(DefaultPlaceholderImageFactory.java:72)
	at com.atlassian.confluence.tinymceplugin.placeholder.MacroPlaceholderServlet.getPlaceholderImage(MacroPlaceholderServlet.java:130)
	at com.atlassian.confluence.tinymceplugin.placeholder.MacroPlaceholderServlet.doGet(MacroPlaceholderServlet.java:101)

原因

The most plausible reason for this is that the image defined as the user macro's icon URL is not publicly accessible by the TinyMCE Plugin. This has been tracked as an improvement request here: CONFSERVER-24857 - Allow Confluence to Use Attached Images as User Macro Icon.

ソリューション

There are two workarounds that can be used to overcome this:

Image Within Confluence

  1. Create a new directory inside CONFLUENCE_INSTALL/confluence/images.
  2. Place the image for the icon inside the created directory.
  3. Access Confluence's User Macro settings via Browse > Confluence Admin > User Macros.
  4. Under Icon URL for the user macro, enter a relative path to the image as per directory created in step two (2) above. For example:

    /images/user_macro_icons/test.jpg
    

  5. Save the user macro.
  6. Now you can insert the user macro into any page/space/blog and the user macro place-holder would load.

Image in a Public Domain/Storage

  1. Place the image for the icon inside a public domain/storage (e.g. Dropbox).
  2. Access Confluence's User Macro settings via Browse > Confluence Admin > User Macros.
  3. Under Icon URL for the user macro, enter the absolute URL to the image as copied in step one (1) above. For example:

    http://dl.dropbox.com/u/3233473/test.jpg
    

  4. Save the user macro.
  5. Now you can insert the user macro to any page/space/blog and the user macro place-holder would load.

(info)If the issue does not resolve itself, try to clear the following:

  • Clear the Confluence cache: Browse > Confluence Admin > Cache Statistics > Flush all
  • Clear your browser cache and cookies.



最終更新日: 2025 年 1 月 30 日

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

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