Hey,

I have CKEditor with WYSIWYG-CKEditor installed and I have JS Aggregation turned on on my prod server. But I kept getting JS errors, upon investing I determined my skin.js and en.js (ckeditor files) where not being "added properly" the ckEditor.basePath was http://domain.com/node/##/ (clearly not right).

Upon adding CKEDITOR_BASEPATH = '/sites/all/libraries/ckeditor/'; to the top of my ckeditor.js file in the libraries everything started to work.

So for some reason the window.CKEDITOR_BASEPATH variable is not being set in ckeditor.ini

Or something?

Any help so I can remove this hack? It's not a massive issue as I do have a hack.

Comments

twod’s picture

Status: Active » Closed (duplicate)

The problem is most likely that allow_url_fopen=0 in PHP.
As of 7.x-2.2, Wysiwyg creates a tiny script file to set base path variables etc automatically, but I mistakenly added that file to the page using an absolute public URL, which means it's not included at all when JavaScript optimization is enabled and php isn't allowed to open files over HTTP. It also puts a warning in the logs if that's enabled.

An update was pushed to the 7.x-2.x branch in #1802394: Warning: file_get_contents from 7.x-2.1 to 7.x-2.2 and it's now out in the 7.x-2.x-dev snapshots and will be part of 7.x-2.3. The file is now being added using the correct URL so Drupal realizes it's a local file and HTTP requests aren't needed to get its contents into the aggregated file.

Update to 7.x-2.x-dev and flush the caches.