Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-55322

Macros fail to display on Confluence pages with 'Error rendering macro' or broken image errors

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 6.2.4, 6.3.3, 6.4.0, 6.4.3, 6.6.1, 6.8.1
    • None

    Description

      Summary

      Several macros fail to display on Confluence pages due to missing fonts.

      Environment

      • Red Hat Enterprise Linux (RHEL) 7.4

      Steps to Reproduce

      1. Create a page with a 'view-file' macro
      2. Attempt to view the page

      Expected Results

      The page is displayed and all macros render

      Actual Results

      The page is displayed but the view-file macro fails to render.
      The below exception is thrown in the atlassian-confluence.log file:

      2017-12-29 10:02:11,465 ERROR [localhost-startStop-1] [atlassian.confluence.security.DefaultCaptchaManager] afterPropertiesSet Could not initialise CAPTCHA service. The most likely reason for thisis that Java's graphics subsystem is not properly configured. Try startingConfluence's JVM with the -Djava.awt.headless=true option. 0
      java.lang.ArrayIndexOutOfBoundsException: 0
      	at sun.font.CompositeFont.getSlotFont(CompositeFont.java:351)
      	at sun.font.CompositeGlyphMapper.initMapper(CompositeGlyphMapper.java:81)
      	at sun.font.CompositeGlyphMapper.<init>(CompositeGlyphMapper.java:62)
      	at sun.font.CompositeFont.getMapper(CompositeFont.java:409)
      	at sun.font.CompositeFont.canDisplay(CompositeFont.java:435)
      	at java.awt.Font.canDisplay(Font.java:1980)
      

      Notes

      The default font was changed from Utopia to Styx in RHEL 7.4, this is not handled well by the JVM and breaks functionality. For more information see Bug 1484079 – AWT java apps fail to start when stix-fonts is used as sans-serif font

      Workaround

      1. Stop Confluence
      2. Create /etc/fonts/local.conf
      3. Paste the following:
        <?xml version='1.0'?>
        <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
        <fontconfig>
          <alias>
            <family>serif</family>
            <prefer><family>Utopia</family></prefer>
          </alias>
          <alias>
            <family>sans-serif</family>
            <prefer><family>Utopia</family></prefer>
          </alias>
          <alias>
            <family>monospace</family>
            <prefer><family>Utopia</family></prefer>
          </alias>
          <alias>
            <family>dialog</family>
            <prefer><family>Utopia</family></prefer>
          </alias>
          <alias>
            <family>dialoginput</family>
            <prefer><family>Utopia</family></prefer>
          </alias>
        </fontconfig>
        
      4. Save the file
      5. Start Confluence

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sbrannen@atlassian.com Branno
              Votes:
              4 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated: