Unable to add macros or edit links in edit mode on some Confluence pages

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

Summary

While in page edit mode, editing links, or trying to insert different macros, such as Jira Issue, Status and inserting an image to the page etc, does not render anymore. 

Environment

7.13.2, 8.5.4

Diagnosis

Use the "fc-list"  command to check different fonts installed on the system. This command will only work if fontconfig is installed, so if this does not work, then kindly refer to Confluence Server 6.13 or later fails with FontConfiguration error when installing on Linux operating systems to install fontconfig or equivalent (based on your Linux distribution) before proceeding further on this.

atlassian-confluence.log may produce errors similar to those seen below when attempting to edit pages.

Caused by: java.lang.NullPointerException at java.desktop/sun.awt.FontConfiguration.getVersion(Unknown Source) 
at java.desktop/sun.awt.FontConfiguration.readFontConfigFile(Unknown Source) 
at java.desktop/sun.awt.FontConfiguration.init(Unknown Source) 
at java.desktop/sun.awt.X11FontManager.createFontConfiguration(Unknown Source) 
at java.desktop/sun.font.SunFontManager$2.run(Unknown Source) 
at java.base/java.security.AccessController.doPrivileged(Native Method) 
at java.desktop/sun.font.SunFontManager.(Unknown Source) 
at java.desktop/sun.awt.FcFontManager.(Unknown Source)
at java.desktop/sun.awt.X11FontManager.(Unknown Source)

Sometimes even the document conversion process will fail and display the following error:

Caused by: java.io.EOFException

[sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$buildConfig$0 worker0: Exception in thread \"main\" java.lang.InternalError: java.lang.reflect.InvocationTargetException
INFO [sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$buildConfig$0 worker0: \tat java.desktop/sun.font.FontManagerFactory$1.run(Unknown Source)
INFO [sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$buildConfig$0 worker0: \tat java.base/java.security.AccessController.doPrivileged(Native Method)
INFO [sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$buildConfig$0 worker0: \tat java.desktop/sun.font.FontManagerFactory.getInstance(Unknown Source)
INFO [sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$buildConfig$0 worker0: \tat java.desktop/java.awt.Font.<init>(Unknown Source)
INFO [sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$buildConfig$0 worker0: \tat java.desktop/java.awt.Font.createFont(Unknown Source)
...
INFO [sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$buildConfig$0 worker0: Caused by: java.lang.NullPointerException
INFO [sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$buildConfig$0 worker0: \tat java.desktop/sun.awt.FontConfiguration.getVersion(Unknown Source)
INFO [sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$buildConfig$0 worker0: \tat java.desktop/sun.awt.FontConfiguration.readFontConfigFile(Unknown Source)


After running this command, if the results are empty, follow the steps below. 

Cause

The cause is missing system fonts installed under /usr/share/fonts  directory and usually would be observed when we are installing Confluence on a new system. 

Solution

Copy the files under this directory from another working system of the same variant or directly download the system fonts for the specific Linux variant. 

Once done, use "fc-cache -v"  to rebuild the fontconfig cache and check again. 


Last modified on Apr 18, 2024

Was this helpful?

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