Message Boards

Problem with UTF-8 BOM formatted CK Editor Files

Klaus Bachmaier, modified 7 Years ago.

Problem with UTF-8 BOM formatted CK Editor Files

Regular Member Posts: 223 Join Date: 9/30/13 Recent Posts
I installed two Liferay Servers for a customer, both on Microsoft Windows Azure Cloud Servers. On both servers the same Liferay version has been installed. While on one server everything works fine, on the second one the CK Editor won't show up. My browsers console says, that there are syntax errors in some of the CK Editors JS files. When I open these files directly in the code view of my browser, they all start with lines like this:


/**
 * @license Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
 * For licensing, see LICENSE.html or http://ckeditor.com/license
 */


The strange characters at the beginning of the file are there, because these files are stored in the "UTF-8 with BOM" format, but should only be in "UTF-8" (without BOM) Format.

My question is: What's the reason why these files aren't causing any problems on the first server but won't work with the second one? I want to make the second server "BOM tolerant" instead of opening hundrets of JS files and saving them with the correct encoding. The first Liferay fixpack could break my fixes, if I would fiddle around with the CK-Editor source files. So I better get things going with the files as they are now.

EDIT:
Some additional Information: I configured a nginx webserver to work as a reverse proxy in front of Liferay. When I switch off this reverse proxy, and access Liferay directly on the server machine with localhost:8080 everything works. The problem onyl appears when the nginx runs. But on my other server there is the same configuration and there it also works with the reverse proxy activated.