Jira Issue Macro is Broken Whilst on Edit Mode

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Problem

JIRA issue macro renders as a broken image while the page is in edit mode but it renders fine while the page is saved or updated.

While the page is in edit mode:

(Auto-migrated image: description temporarily unavailable)

After saving or updating the page:

(Auto-migrated image: description temporarily unavailable)

The following appears in the atlassian-confluence.log

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2018-01-01 00:00:00,000 ERROR [http-nio-8090-exec-10] [[Standalone].[localhost].[/].[servlet-module-container-servlet]] log Servlet.service() for servlet [servlet-module-container-servlet] in context with path [] threw exception java.lang.ArrayIndexOutOfBoundsException: 0 at sun.font.CompositeStrike.getStrikeForSlot(CompositeStrike.java:75) at sun.font.CompositeStrike.getFontMetrics(CompositeStrike.java:93) at sun.font.FontDesignMetrics.initMatrixAndMetrics(FontDesignMetrics.java:359) at sun.font.FontDesignMetrics.<init>(FontDesignMetrics.java:350) at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:302) at sun.java2d.SunGraphics2D.getFontMetrics(SunGraphics2D.java:855) at com.atlassian.confluence.plugins.viewfile.macro.ViewFileMacroUtils.drawFileNameOnImage(ViewFileMacroUtils.java:182) at com.atlassian.confluence.plugins.viewfile.macro.ViewFileMacroUtils.getPlaceholderWithFileName(ViewFileMacroUtils.java:158) at com.atlassian.confluence.plugins.viewfile.macro.FilePlaceholderGeneratorServlet.doGet(FilePlaceholderGeneratorServlet.java:32) at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at com.atlassian.plugin.servlet.DelegatingPluginServlet.service(DelegatingPluginServlet.java:37) ... ...

Diagnosis

Environment

  • Confluence is running on CentOS version 7.4

Diagnostic Steps

  • All JIRA issue macro are affected

  • Reproducible on different browsers

  • Clearing the browser cache doesn't help

  • The macro throws error 500 in the browser

Cause

There are missing fonts on the OS level that more recent versions of Confluence depend on to render the macro properly.

Solution

Resolution

Please check/install the following font packages:

1 2 3 4 5 6 yum install ghostscript yum install dejavu-fonts-common yum install dejavu-sans-fonts yum install dejavu-sans-mono-fonts yum install dejavu-serif-fonts yum install motif

In order for Confluence to pick up the changes, please apply the below steps:

  1. Stop Confluence

  2. Rebuild the font cache by using the following command:

    1 fc-cache -s
  3. How to clear the apps (plugins) cache in Confluence Data Center

  4. How to Rebuild the Content Indexes From Scratch on Unclustered Confluence

  5. Start Confluence.

  6. Clear your browser cache and verify Confluence is presenting the macro properly.

    ℹ️ If you still see the issue, try rebooting the server, then check again.

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.