Hi,

I happily use ckeditor in my website.
I was wondering if anyone could tell me why it is that IE (not Chrome or Opera), gives "'CKEDITOR' is not defined" javascript messages in the status bar on pages that do NOT contain the ckeditor. Apparently the script (in the compressed js) is loaded and is expecting but not receiving the ckeditor object. Is this a setup issue and if not, why is the object being called on a page not containing the editor?

Errordetails page:
User agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)
Message: 'CKEDITOR' is not defined
URI: http://www.example.com/sites/default/files/js/js_70aa597b71a08feab7467ef...

Thanks for any suggestion!

Max

Comments

anyone?

Hi,
please look #1137698: ckeditor files not found. (#3) and refer to readme file in CKEditor module directory. This problem look like you don't have CKEditor library (from http://ckeditor.com/download) loaded or files from this library are missing/not readable.
PS) Can you update to latest version of module (6.x.1.2 or DEV) and check this again.

Thank you for responding.

However, CKeditor works fine on all pages where it should display, without any error messages on missing files. I would think this means that all necessary files are present. During install I have also performed all steps mentioned at http://drupal.org/node/1137698 (#3). So really all is fine.

It is only on pages where it is not intented to display (but where the ckeditor.config.js is loaded anyway it seems), that the error messages appear, and only on IE8 and lower versions.

I guess the real question is, why the javascript file is loaded on every page, including those where no ckeditor should ever be displayed (like my frontpage), thus the script keeps looking for objects not loaded?

Status:Active» Postponed (maintainer needs more info)

@Maxim75, try to use default theme and check does it help, if not try also to disable all installed modules and check again...
I think it's problem with IE and limit for max request to server - if u have too much CSS and JS script, then IE not load everything when it reach the top limit.
When u check this, pls write result of your test

Greetings

Thank you for your respons.

When I used the default garland theme, the problem was gone, which led me to the conclusion that I shouldn't override the ckeditor.config.js by placing it in the theme folder. I thought this would be handy, because it would let the original js file in the module folder unchanged, but this of course caused the javascript to load on every page, including those where the editor isn't in use, causing these error messages, looking for non-existing objects.

This does raise the question however how to override this js file to not have to make changes in the module folder, but without loading the script on every page. Any idea?

Max

@Maxim75, which theme do u use?

Greetings

agua

Greetings

I try this theme in version 6.x-1.2 and evrything works fine...
I test this with CKEditor module last DEV and CKEditor library 3.6 - maybe try to update both to last version...
Do u use any cache?

Greetings

I don't think the problem was caused by the theme itself, but by using the overriding mechanism via themes in general. This would therefore have appeared in all themes.

The only question that remains is how or better where to override the ckeditor.config.js if placing it in the theme means it gets loaded on all pages.

Thanks for your help.

Status:Postponed (maintainer needs more info)» Closed (fixed)

Hi,

I've been having the same problem and unable to find a solution, I came up with the following fix:
in ckeditor.styles.js I surrounded the main function with:

if(typeof(CKEDITOR) !== 'undefined') {
/* Original code */
}

This has fixed the problems for me. Hope this helps someone!

T

Status:Closed (fixed)» Active

Great! Hope this may lead to a generic solution that will allow overriding the js file by placing it in a (random) theme folder without loading it on pages where it isnt't used!

Cheers!

Title:'CKEDITOR' is not defined'CKEDITOR' is not defined - problem with ckeditor.styles.js
Status:Active» Fixed

@tobykilroy, really thx for patch. I add this and commit to GIT.

Pls check last DEV version.

Greetings

Title:'CKEDITOR' is not defined - problem with ckeditor.styles.js[D6] 'CKEDITOR' is not defined - problem with ckeditor.styles.js

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.