This articles serves as a troubleshooting guide for users working in Liferay DXP 7.0. When it comes to adding assets using the alloy editor on Windows OS, you may encounter some difficulties. The browser may display a ReferenceError: CKEDITOR is not defined
, and the console may display ERROR [WebContainer : 3]
. Below, find the information you need to troubleshoot around this situation.
Steps to Reproduce
- Liferay running on WebSphere 8.5.5.9, login on localhost
- Open the "+" Add panel on the right, click Content > Add New
- Try to add any of the following assets: Web Content, Blogs, Calendar, Knowledge Base
Expected Result
User can add any and all of these assets, either from the add panel or their respective admin menus in Site Administration.
Actual Result
User cannot add these assets, comments, or new forms and the browser displays ReferenceError: CKEDITOR is not defined
and the console displays
[6/6/16 13:59:58:542 PDT] 0000016e SystemOut O 13:59:58,542 ERROR [WebContainer : 3][GoogleJavaScriptMinifier:116] (bundleentry://506.fwk1018961821/META-INF/resources/ckeditor/ckeditor.js:1): Parse error. illegal character
[6/6/16 13:59:58:542 PDT] 0000016e SystemOut O 13:59:58,542 ERROR [WebContainer : 3][GoogleJavaScriptMinifier:129] {0} error(s), {1} warning(s)
However, users can add Bookmarks and any Document type (e.g. Basic, Contract, Sales Presentation, etc.--assets that don't use CKEditor).
Resolution
The root cause is that UTF-8 has not been declared in WebSphere 8.5.5.9's JVM settings.
According to Liferay's official documentation, Installing Liferay DXP on WebSphere 8.5.5 states that the JVM parameters have to be set. There are two ways of doing so:
- You can modify this file:
[Install Location]/WebSphere/AppServer/profiles/your-profile/config/cells/your-cell/nodes/your-node/servers/your-server/server.xml
.- Add the following inside the
jvmEntries
tag:<jvmEntries xmi:id="JavaVirtualMachine_1183122130078" ...genericJvmArguments="-Dfile.encoding=UTF-8" />
- Add the following inside the
- The other way is to do so in the WebSphere Application Server's Control Panel.
- Click Application Servers → server1 → Process definition.
- Click Java Virtual Machine under Additional Properties.
- Enter
-Dfile.encoding=UTF-8
in the Generic JVM arguments field. - Click Apply and then Save to master configuration.
Once the settings have been applied, whether in the XML file or in the Control Panel, assets can be created.
Additional Information
See LPS-66224 for more information and the latest status on the issue.