ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

CKEDITOR is not defined

July 29, 2010 6:45pm

Subscribe [4]
  • #1 / Jul 29, 2010 6:45pm

    Wouter Vervloet

    758 posts

    This question may be related to a resolved thread.

    Just like Eric I’m getting this error. And installing a new copy didn’t fix it for me.

    I have it installed on my local XAMPP server and accessing it through http://localhost/mmcms/index.php. I left all the settings at it’s default value and installed the default site.

    In Chrome 5.0.375.125 and Safari 5.0 (6533.16) the editable region just deactivates (yellow background disappears), but in Firefox (3.6.8) the editable region gets hidden.

    Any ideas?

    Greetz,
    Wouter

  • #2 / Jul 29, 2010 7:22pm

    Wouter Vervloet

    758 posts

    I did some digging around in teh source code and after turning debugging on, I got this error when calling: http://localhost/mmcms/index.php/javascript/load_ckeditor

    A PHP Error was encountered
    
    Severity: Notice
    
    Message: Undefined property: Member_model::$db
    
    Filename: models/member_model.php
    
    Line Number: 238

    Does this help?

    Greetz,
    Wouter

  • #3 / Jul 29, 2010 7:45pm

    Wouter Vervloet

    758 posts

    Digging a bit deeper:

    it seems to error out on line 315 in CodeIgniter.php (/system/codeigniter/system/core/CodeIgniter.php)

    // Call the requested method.
    // Any URI segments present (besides the class/function) will be passed to the method for convenience        
    call_user_func_array(array(&$CI, $method), array_slice($URI->rsegments, 2));

    If I put an echo before this line it is outputted and if I put an echo after it, it doesn’t…

    Good luck with figuring this one out…

  • #4 / Jul 29, 2010 11:10pm

    Derek Jones

    7561 posts

    What version of PHP are you running, Wouter?

  • #5 / Jul 30, 2010 2:55am

    Wouter Vervloet

    758 posts

    hi Derek,

    I’m running PHP Version 5.3.0 and just for the record: Apache 2.2.12.

  • #6 / Jul 30, 2010 11:32am

    Derek Allard

    3168 posts

    Sorry Wouter if you got bit by this. I believe it was an oversight on my part. It sure looks like the same issue. You can find a patch here, and I promise we’ll get it sorted for you. Sorry for that, and please let me know if it resolves things. I’ve posted an explanation of what’s going on also.

  • #7 / Jul 30, 2010 1:14pm

    Derek Allard

    3168 posts

    Hey Wouter. In the other thread you mentioned re-applying the Auth patch didn’t work if you keep your $debug to 1 your index.php and directly visit http://localhost/mmcms/index.php/javascript/load_ckeditor what do you see?

  • #8 / Jul 30, 2010 2:35pm

    Wouter Vervloet

    758 posts

    I still can’t edit any pages, but it is a different problem now.

    When I access that URL I get the contents of the javascript file… like it should. But when I try to edit the region now, Chrome throws the following error:

    Uncaught TypeError: Cannot read property 'options' of undefined                      mmcms:44

    Same on Firefox and Safari.

    On Opera 10.50 pre-alpha however… it works just fine. So we’re getting there…

  • #9 / Jul 30, 2010 4:30pm

    Derek Allard

    3168 posts

    Is the mojo editor bar default? In other words, did you modify config/ckeditor.php? I’m assuming you didn’t, but want to ask. Also, you’re using english?

    Can you provide any more context around that error? I don’t see it, and I want to leverage your strong trouble-shooting skills here 😊

  • #10 / Jul 30, 2010 4:36pm

    Wouter Vervloet

    758 posts

    Hi Derek,

    Everything about the install is as vanilla as it can get. I left all the settings as they were by default and just installed it with the Green Tea site.

    About context, I’m not really sure what you mean by that to be honest… I’ll have a go and see if I can track it down somehow and help you out a little bit.

    Greetz,
    Wouter

  • #11 / Jul 30, 2010 4:44pm

    Wouter Vervloet

    758 posts

    Well… That went faster than expected, because I think I’ve tracked it down already.

    I did a search for “.options” in the source code and one of the results was:

    menu.definition.panel.attributes[ 'aria-label' ] = editor.lang.common.options;

    After that I noticed that the language file of the editor wasn’t getting loaded. I haven’t changed any of the setting, so I’m left wondering why it would search for the Dutch language file, but it was trying to call this URL: http://localhost/mmcms/system/mojomotor/javascript/ckeditor/lang/nl.js?t=A39E and obviously couldn’t find it.

    Did I change any language by accident or is it trying to auto-discover which language I’m using?

    Greetz,
    Wouter

  • #12 / Jul 30, 2010 4:44pm

    Jan Quickels

    6 posts

    Hi guys, it seems that I´ve got a similar issue. The editor isn´t loaded in Safari or Firefox…

    I´ve tried the patched Auth.php and the old file–it doesn´t work.

    Error thrown: CKEDITOR is not defined

    Is this the same as Wouter´s problem?

  • #13 / Jul 30, 2010 4:54pm

    Wouter Vervloet

    758 posts

    @Jan: The patched Auth.php file solved the CKEDITOR issue for me, but then I stumbled upon a different one… which I think I solved too.

    @derek: I noticed this little method in the ckeditor.js file:

    detect:function(k,l){var m=this.languages;l=l||navigator.userLanguage||navigator.language; ...

    and as you may have guessed, my browser is set to Dutch. That is why it worked for you and in my Opera as that install is in English.

    If I bypass the whole language detection and change that method to this:

    detect:function(k,l){ return 'en'; ...

    the editor works like a charm.

    So perhaps that function should either be modified to use the MojoMotor language settings, or every possible language in the world should be added to the ckeditor source. Hmmm… I wonder which is easier to do…?

    😉

  • #14 / Jul 30, 2010 5:02pm

    Jan Quickels

    6 posts

    My browser is set to german, so this seems to be the same issue.

    Now I´ve got this error:

    l.lang.contextmenu is undefined

    The CKEditor isn´t loaded at my site using the patched file?!?

  • #15 / Jul 30, 2010 5:03pm

    Derek Allard

    3168 posts

    Wouter. I got it.

    open up config.php and set

    $config['use_compressed_js'] = 'n';

    Now open up system/mojomotor/javascript/src/mojobars.js Around 479 you’ll see

    "skin": "mojo,"+Mojo.URL.editor_skin_path,
    "startupMode": Mojo.edit_mode,

    Could you add in

    "skin": "mojo,"+Mojo.URL.editor_skin_path,
    "language": "en", // <-------------------------- this line
    "startupMode": Mojo.edit_mode,

    I’m nearly certain this will fix it. We’ll be releasing a build update later today, and this will be in there. The long answer is that the editor is defaulting to language autodetection, but it only ships with the english pack.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases