Opened 4 years ago

Closed 4 years ago

#11943 closed Bug (duplicate)

ckeditor 4.4 random crash when switching to source mode

Reported by: Alex Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

Happens randomly while switching to source mode in chrome Version 34.0.1847.131 m And freezes without option go back to text mode.

Uncaught TypeError: Cannot read property 'config' of undefined ckeditor.js:728

CKEDITOR.tools.createClass.proto.getData ckeditor.js:728 (anonymous function) ckeditor.js:332 i ckeditor.js:10 CKEDITOR.event.CKEDITOR.event.fire ckeditor.js:12 CKEDITOR.editor.CKEDITOR.editor.fire ckeditor.js:13 CKEDITOR.tools.extend.getData ckeditor.js:242 CKEDITOR.editable.CKEDITOR.tools.createClass._.detach ckeditor.js:341 (anonymous function) ckeditor.js:26 CKEDITOR.editable.CKEDITOR.tools.createClass.proto.detach ckeditor.js:332 CKEDITOR.tools.createClass.proto.detach ckeditor.js:839 CKEDITOR.editor.editable ckeditor.js:342 CKEDITOR.editor.setMode ckeditor.js:317 CKEDITOR.plugins.sourcearea.commands.source.exec ckeditor.js:839 exec ckeditor.js:175 CKEDITOR.tools.extend.execCommand ckeditor.js:241 CKEDITOR.tools.extend.click ckeditor.js:638 d.execute ckeditor.js:639 (anonymous function) ckeditor.js:639 (anonymous function) ckeditor.js:27 CKEDITOR.tools.callFunction ckeditor.js:27 onclick site.aspx?id=5:1

Attachments (1)

build-config.js (2.6 KB) - added by Alex 4 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 4 years ago by Jakub Ś

Keywords: source mode crash removed
Status: newpending
Version: 4.4.0

I've been clicking for quite some time and I didn't get this error.

  1. Which package you use? Is it one of predefined ones or you use some third party plugins as well? If yes please try without these plugins.
  2. Are you using any Chrome plugins? If yes, could you try without them?
  3. Have you made any core code modifications in CKEditor?
  4. Which operating system you use?
  5. Could you send us your build-config.js and page where you have CKEditor configured - provided that you are using some non-standard settings or plugins.

comment:2 Changed 4 years ago by Alex

Yeah It is pretty random, I didn't notice any consistency yet but I will keep trying.

1) I use standard package and I do use plugins, will send you more details today, one of the plugins is a Roxy file manager.

2) I do use chrome plugins, will disable and let you know if it helped.

3) No core modifications done

4) Windows 7

5) Will send the js today, the only plugins I use is jquery 1.7.2 and jquery UI 1.8 widgets.

Thanks

Changed 4 years ago by Alex

Attachment: build-config.js added

comment:3 Changed 4 years ago by Alex

1) I have uploaded build-config

2) I have disabled all my chrome plugins but I still get the error.

Also don't no if it related to the same issue but in IE11 I get the following error when I just open ck editor with text being populated via jquery ajax:

SCRIPT70: Permission denied

File: site.aspx, Line: 54, Column: 375

Nothing is crashed, ckeditor continue to work fine.

Thanks

Last edited 4 years ago by Alex (previous) (diff)

comment:4 Changed 4 years ago by Alex

I think I have found a solution,
After I have removed the first CKEDITOR.instancestxtEditor?.setData("");
I could not reproduce anymore the error in chrome and IE11
Still trying...

I understand now that I can't call setData twice?

I still need to clean the content before I load a new one, any good possible solutions?

function LoadHtml(ContentID) {
    ShowPopup();    
    CKEDITOR.instances['txtEditor'].setData("");
    $('div').append(AnimationLoad);

    PostAsyncAjax("Edit",
        { 'ContentID': ContentID},
        function (data) {
            var ckData = data.d;
            CKEDITOR.instances['txtEditor'].setData(ckData.HtmlContent);
            $('#AnimationLoad').remove();
        }
    );
}

comment:5 Changed 4 years ago by Jakub Ś

Resolution: duplicate
Status: pendingclosed

If this is setData called twice issue that this is a duplicate of #10501. Yes there is bug with it.

Please have a look at workarounds mentioned there. If they don't suit you than perhaps below workaround might be something you need.

var editor = CKEDITOR.replace('someName', { });
editor.on( 'instanceReady', function(){               
                editor.element.$.value = 'Hello';
                editor.setData( 'Hello', function(){
                    CKEDITOR.myDataLoaded = true;
                });
               
               
                if( CKEDITOR.myDataLoaded )
                    editor.setData( 'Hello' );
                else {
                    var interval = window.setInterval( function() {
                        if( CKEDITOR.myDataLoaded ){
                            editor.setData( 'Hello' );
                            window.clearInterval( interval );
                        }   
                    }, 200);
                }   
            });

DUP of #10501.

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy