Problem
The Linchpin Theme configuration can not be loaded and the overall system performance is bad. The configuration has been corrupted due to a wrong encoding. The Linchpin Theme tries to store the configuration in UTF-8. If the System is set to use a different encoding (e.g. Cp1252), the system will try to convert between those encodings. This works fine, unless the Theme contains a special character like an umlaut, accent, etc. This conversion between the encodings know cause the special characters to duplicate and corrupt the configuration, since it grows exponentially with every update. If the configuration has grown enough, it puts too much load on the System to handle.
To verify, that you are hit by this problem, please check if the following behaviors apply:
- When the Linchpin Theme is enabled, the overall system performance is bad. When the Confluence Default Theme is enabled, the overall system performance is as usual.
- The Linchpin Theme configuration can not be accessed in the Confluence Administration. The page stays black or shows an error.
- The Confluence log files indicate an OutOfMemoryException.
- In the System Information section of the Confluence administration you can verify, that sun.jnu.encoding and file.encoding are nor set to UTF-8.
- A Health Check fails, noting there is something wrong with the encoding.
Any custom code (CSS or JS) you added to your Theme Configuration (which can be seen via the admin panel > Theme > Configuration > Advanced) will not be retroactively converted to UTF-8 when you update the encoding.
To make sure that custom code will not present an encoding issue, please follow these steps:
- export the current Theme configuration (via Administration > Theme > Export)
- open it in an editor like Sublime or Notepad++
- Save the file with encoding UTF-8 (no BOM) [This will be shown as an option in the editor]
- re-import the file to your Theme
If you are not able to follow these steps, please commence with the steps outlined below.
Solution
The following steps describe how to fix this issue. Before starting, please read all steps, because this process can lead to the loss of your theme configuration.
1. Get a backup of the configuration
Run the SQL statement against the Confluence database to retrieve the Linchpin Theme configuration. The result will contain an XML with at least 184 lines. Since you are hit by this issue, it will be probably much larger, in the range of 15 MB to 20 MB.
select bandanavalue from bandana where bandanakey like 'net.seibertmedia.confluence.linchpin.theme.config';
If this is not successful, please try to retrieve the information from a backup. Open a request at our App Helpdesk and attach the retrieved data. We will try to restore a valid configuration, that you can import later.
If you are not able to retrieve the theme configuration from the database or from a backup, the configuration will be lost! This requires you to configure the theme from scratch!
2. Clear the configuration
To clear the corrupted configuration run the SQL statement against your confluence database.
delete from bandana where bandanakey like 'net.seibertmedia.confluence.linchpin.theme.config';
After that go to the Confluence administration, go to the _Cache Management_ section and clear all caches (button at the bottom right of the page.)
3. Adjust settings
To prevent this from happening again, please add two parameters to the startup parameters of the JVM or the service.
-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8
After adding the parameters, restart the server or service.
4. Import the theme
If step 1 was successful and you have submitted the configuration to our help desk, you can now safely import the file we've supplied to you. After that everything should operate normally again.
If step 1 was not successful, you will need to configure the Linchpin Theme from scratch.
Related Articles
- Linchpin Theme is part of the Linchpin Intranet Suite and Linchpin Essentials
Check out the editing space layouts not after updating Linchpin Theme here!