Jira Issue Macro is Broken Whilst on Edit Mode

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

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:

After saving or updating the page:

The following appears in the atlassian-confluence.log

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.

Resolution

Please check/install the following font packages:

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:

    fc-cache -s
  3. Clear Confluence plugins cache
  4. Rebuild the Content Indexes From Scratch
  5.  Start Confluence.
  6. Clear your browser cache and verify Confluence is presenting the macro properly.
    (info) If you still see the issue, try rebooting the server, then check again.




Last modified on Nov 2, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.