Hi, latest november 22 dev release throws this error in Chrome's inspector

Uncaught TypeError: Object [object Object] has no method 'addCss'

on line 46 and the editor can't be seen. Using the v4 nightly.

Cheers

Comments

dczepierga’s picture

Could you write in which file do u have this error?
Do u have any additional modules/plugins?

Greetings

Lux Delux’s picture

Ah yes sorry for not including that. File is from the module

includes/ckeditor.utils.js

The only plugin I have activate is the CKEditor Link
http://drupal.org/project/ckeditor_link

Cheers

dczepierga’s picture

Try to update to last DEV. After update clear cache... it should work without any problem

Lux Delux’s picture

At first it didn't work, but then I disabled the CKEditor Link module and it worked. This is with the latest dev release.

So it seems the link module needs to be updated? Don't know if I should post here or there

Failed to load resource: the server responded with a status of 404 (Not Found) http://www.bad-good.org/sites/all/libraries/ckeditor/sites/all/modules/c...

somehow the module path gets weird

EDIT: this happens with the Linkit module too

dczepierga’s picture

Title:Uncaught TypeError, editor won't show» [D7] Wrong path on external plugins loaded by hook
Status:Active» Fixed

I fix it and commit changes to GIT (diff).

Really thx for help and review module.

Pls update to last DEV version and check does it works now. If u have still problem with it pls write here.

Greetings

kevindeleon’s picture

Receiving the same error even with the nightly build. Editor is not showing in Firefox and Chrome.
Errors:

Chrome:
Uncaught TypeError: Object [object Object] has no method 'addCss'

Firefox:
Error: ev.editor.addCss is not a function
Source File: http://drupaltest.site/sites/all/modules/ckeditor/includes/ckeditor.util...
Line: 46

Version 3.6.5 works fine.

dczepierga’s picture

Do u clear cache in the Drupal after update?

U should have in file with error sth like this around line 45:

      configLoaded  : function(ev)
      {
        Drupal.ckeditor_ver = CKEDITOR.version.split('.')[0];
        if (Drupal.ckeditor_ver == 4) {
          CKEDITOR.addCss(ev.editor.config.extraCss);
        }
        else {
          ev.editor.addCss(ev.editor.config.extraCss);
        }
      },

Could u check does u have it there?

Greetings

Kylie Morgan’s picture

Status:Fixed» Needs work

I have cleared cache several times after installing on a fresh installation today. Still errors:

Uncaught TypeError: Object [object Object] has no method 'addCss' ckeditor.utils.js:46
textarea_settings.on.configLoaded ckeditor.utils.js:46
h ckeditor.js:10
CKEDITOR.event.CKEDITOR.event.fire ckeditor.js:12
CKEDITOR.editor.CKEDITOR.editor.fire ckeditor.js:13
CKEDITOR.event.CKEDITOR.event.fireOnce ckeditor.js:12
CKEDITOR.editor.CKEDITOR.editor.fireOnce ckeditor.js:13
(anonymous function) ckeditor.js:189
h ckeditor.js:10
CKEDITOR.event.CKEDITOR.event.fire ckeditor.js:12
CKEDITOR.editor.CKEDITOR.editor.fire ckeditor.js:13
CKEDITOR.event.CKEDITOR.event.fireOnce ckeditor.js:12
CKEDITOR.editor.CKEDITOR.editor.fireOnce ckeditor.js:13
e ckeditor.js:187
(anonymous function) ckeditor.js:188
m ckeditor.js:174
n ckeditor.js:174
o ckeditor.js:174
(anonymous function)

Edit: I didn't realize this was the dev version until after I posted, so this is still going on in the live version 7.x-1.9.

sfield’s picture

I am seeing this in the latest release, using Chrome on Windows 7.
The result is that the edit box is simply missing, replaced by a blank area, so no editing can be done.
Is there a known work-around until the fix is checked in?

In ckeditor.utils.js starting at line 42:

      textarea_settings['on'] =
        {
            configLoaded  : function(ev)
            {
                ev.editor.addCss(ev.editor.config.extraCss);
Uncaught TypeError: Object [object Object] has no method 'addCss' (repeated 2 times)
            },
            instanceReady : function(ev)
            {
                var body = $(ev.editor.document.$.body);

                ev.editor.dataProcessor.writer.setRules('p', {
                    breakAfterOpen: false
                });

                if (typeof(ckeditor_obj.input_formats[ckeditor_obj.elements[textarea_id]].custom_formatting) != 'undefined') {
                    var dtd = CKEDITOR.dtd;
                    for ( var e in CKEDITOR.tools.extend( {}, dtd.$block, dtd.$listItem, dtd.$tableContent ) ) {
                        ev.editor.dataProcessor.writer.setRules( e, ckeditor_obj.input_formats[ckeditor_obj.elements[textarea_id]].custom_formatting);
                    }
                    ev.editor.dataProcessor.writer.setRules( 'pre',
                    {
                        indent: ckeditor_obj.input_formats[ckeditor_obj.elements[textarea_id]].output_pre_indent
                    });
                }

                if (ev.editor.config.bodyClass)
                    body.addClass(ev.editor.config.bodyClass);
                if (ev.editor.config.bodyId)
                    body.attr('id', ev.editor.config.bodyId);
                if (typeof(Drupal.smileysAttach) != 'undefined')
                    ev.editor.dataProcessor.writer.indentationChars = '    ';
            },
            focus : function(ev)
            {
                Drupal.ckeditorInstance = ev.editor;
                Drupal.ckeditorActiveId = ev.editor.name;
            }
            ,
            afterCommandExec: function(ev)
            {
                if (ev.data.name != 'maximize') { return; }
                if (ev.data.command.state == CKEDITOR.TRISTATE_ON) { drupalTopToolbar.hide(); } else { drupalTopToolbar.show(); }
            }
        };

mfuggle’s picture

Version:7.x-1.x-dev» 7.x-1.9

I am seeing this exact same issue on Safari as well. I have not updated to the latest dev and am using the 7.x-1.9 version.

Cheers
Martin Fuggle

Earwig’s picture

I've just updated to 7.x-1.9 and have the same problem.

dczepierga’s picture

Version:7.x-1.9» 7.x-1.x-dev
Status:Needs work» Fixed

First of all, CKEditor v4 not work with CKEditor module 7.x-1.9 !!!

Pls use last DEV version for it.
Here is issue to add support for CKEditor v4: #1847662: [D7] Add support for CKEditor v4.

If u found any bugs pls write there, and test it with last DEV version.

Greetings

Lux Delux’s picture

Just wanted to thank you for fixing all the problems, works fine here with the Link plugin. Cheers

irohit786’s picture

Thanks a trillion

pbattino’s picture

well, if it does not work why the hell module 7.x-1.9 tells me to download it???
this is the message we get when we install 7.x-1.9 :

The CKEditor component is not installed correctly. Please go to the CKEditor homepage in order to download the latest version. [...]

I follow the link and... guess what, the " latest version " is v4....

A good recipe for harvesting useless issue requests...

mkesicki’s picture

@pbattino,
recently CKEditor 4 was released. This is big step and we are working hard to add support to it into our drupal modules. Ticket related with this is here: #1847662: [D7] Add support for CKEditor v4.
Generally latest stable version of CKEditor for drupal module 7.x-1.9 was compatible with CKEditor 3.x series.
Documentation says, that you should use latest stable version of CKEditor module and this is generally true , but please remember that now is a little crucial moment between change of major versions of CKEditor library. Sorry for misunderstanding.

mkesicki’s picture

Status:Fixed» Closed (fixed)
mkesicki’s picture

Title:[D7] Wrong path on external plugins loaded by hook» [D7] Wrong path to external plugins loaded by hook
rdy_kc’s picture

>>Generally latest stable version of CKEditor for drupal module 7.x-1.9 was compatible with CKEditor 3.x series.

Understood this is the cause. Can anyone point me in the right direction for rolling back and implimenting CKEditor 3.x instead?