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
Comment #1
tezalsec CreditAttribution: tezalsec commentedanyone?
Comment #2
mkesicki CreditAttribution: mkesicki commentedHi,
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.
Comment #3
tezalsec CreditAttribution: tezalsec commentedThank 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?
Comment #4
dczepierga CreditAttribution: dczepierga commented@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
Comment #5
tezalsec CreditAttribution: tezalsec commentedThank 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
Comment #6
dczepierga CreditAttribution: dczepierga commented@Maxim75, which theme do u use?
Greetings
Comment #7
tezalsec CreditAttribution: tezalsec commentedagua
Greetings
Comment #8
dczepierga CreditAttribution: dczepierga commentedI 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
Comment #9
tezalsec CreditAttribution: tezalsec commentedI 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.
Comment #10
tezalsec CreditAttribution: tezalsec commentedComment #11
tobykilroy CreditAttribution: tobykilroy commentedHi,
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:
This has fixed the problems for me. Hope this helps someone!
T
Comment #12
tezalsec CreditAttribution: tezalsec commentedGreat! 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!
Comment #13
dczepierga CreditAttribution: dczepierga commented@tobykilroy, really thx for patch. I add this and commit to GIT.
Pls check last DEV version.
Greetings
Comment #14
dczepierga CreditAttribution: dczepierga commented