When choosing ckeditor_basic.js as "load method" under "Advanced Options" in the ckeditor configuration page I receive two errors when trying to add a new content. The CKEditor is not loaded but I can make it visible if I toggle the "switch to plain text editor" switch twice.
Errors shown by Firebug:
1.
CKEDITOR is not defined
CKEDITOR.loadFullCoreTimeout = 0;
2.
CKEDITOR.instances is undefined
if (typeof(CKEDITOR.instances[ta_id]) != 'undefined'){
The first error occurs since CKEDITOR.loadFullCoreTimeout = 0; is loaded in the head of the document but ckeditor_basic.js is loaded near the end of the body tag (scope = footer). The object is hence not available. To fix this I changed the code from:
drupal_add_js('CKEDITOR.loadFullCoreTimeout = ' . $profile->settings['ckeditor_load_time_out'] . ';', 'inline');
to
drupal_add_js('CKEDITOR.loadFullCoreTimeout = ' . $profile->settings['ckeditor_load_time_out'] . ';', array('type' => 'inline', 'scope' => 'footer'));
at row 1065 in includes/ckeditor.lib.inc
The other issue was simply fixed by adding another check in the if statement in includes/ckeditor.utils.js at row 213
if (CKEDITOR.instances && typeof(CKEDITOR.instances[ta_id]) != 'undefined'){
Drupal.ckeditorOff(ta_id);
}
I don't know how to write patches otherwise I could have posted those.
Comments
Comment #1
dczepierga commented@marhak, really thx for fix - I commit it to GIT.
Please check the latest dev release and let me know if you notice any poblems with it. Remember to clear Drupal cache and browsers cache before testing.
Greetings