Opened 4 months ago

Last modified 2 months ago

#16898 pending Bug

Getting "Unable to set property 'setState' of undefined and null reference" in richcombo/plugin.js

Reported by: kamalnayan Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc: log.kamaln@…

Description

We are using ckeditor4.5.7 in our applications which contains multiple editor sections and getting the error when we click on first editor section and then click on another editor section quickly. There could be a race condition due to which facing issue. but, please look into this and let me know if there is any fix for that.

Steps to reproduce

  1. Click on first editor section
  2. Click on another editor section quickly

Expected result

Should work without any issue

Actual result

Getting "Unable to set property 'setState' of undefined and null reference" error in richcombo/plugin.js

Other details (browser, OS, CKEditor version, installed plugins)

Browser:IE11, OS:Win-7, CKEditor:4.5.7

Attachments (3)

richcombo.PNG (307.6 KB) - added by kamalnayan 4 months ago.
Error screenshot
CKEditor_Test.html (2.8 KB) - added by kamalnayan 3 months ago.
HTML file
Error_Screenshot.PNG (58.3 KB) - added by kamalnayan 3 months ago.

Download all attachments as: .zip

Change History (13)

Changed 4 months ago by kamalnayan

Error screenshot

comment:1 Changed 4 months ago by j.swiderski

  • Status changed from new to pending
  • Version 4.5.7 deleted

I have not been able to reproduce that. I have tried using multiple editors on page, clicking into them or into dropdowns when they load but nothing has happen. Please provide:

  1. Screen cast showing how to reproduce the problem
  2. Reduced HTML sample file which I could put into default CKEditor samples folder and reproduce the problem.
  3. Please also try reproducing this issue in latest default CKEditor 4.6.2 and outside of your application in order to exclude the influence of third-part scripts and third-party editor plugins.
Last edited 4 months ago by j.swiderski (previous) (diff)

comment:2 Changed 3 months ago by kamalnayan

Thanks! a lot for the reply Swiderski, Is there any way to check the editor is instantiated properly with all the plugins associated with it. like wordcount, scayt, richcombo etc.

comment:3 Changed 3 months ago by j.swiderski

Please see https://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-instanceReady e.g. This function will be fired after CKEditor has been fully initialized.

vare editor = CKEDITOR.replace('editor1', {/*config goes here*/});
editor.on('instanceReady', function( evt ){
// you can call editor or evt.editor or other code of your choice here
});

@kamalnayan you need this to reproduce the problem or your problem was calling some code too early?

comment:4 Changed 3 months ago by kamalnayan

Hi Swiderski, I have tried even masking panel till the CKEditor is fully initialized to avoid above JS error. But, able to reproduce the same issue once I click another editor section quickly just after unmasking panel on instance ready of CKEditor. Please find below code snippet used and let me know what should be the fix of this.

CKEDITOR.on('instanceReady',function(e){

if(Ext.get("documentView")){

Unmask once the editor is fully initialized

Ext.getCmp("documentView").getEl().unmask();

}

});

Last edited 3 months ago by kamalnayan (previous) (diff)

comment:5 Changed 3 months ago by kamalnayan

Hi Swiderski, Please provide me an update once you get time to look into this.

comment:6 Changed 3 months ago by j.swiderski

click another editor section quickly just after unmasking panel on instance ready

Were both editors loaded or just a single one?

Is it possible to reproduce this issue without Ext? This is quite a big framework and it is really hard to say whether there is something wrong in the editor or rather in Ext which is conflicting with CKEditor. It could also be an invalid usage of Ext for example.

Are you able to reproduce it in clean environment without any third-party scripts?

comment:7 Changed 3 months ago by kamalnayan

Hi Swiderski, I am constructing a page with multiple editor sections without using third party script to reproduce the issue. I will get back to you once it is ready.

Meanwhile, As per my last comment I am just restricting user to click another editor section(Both editor sections are loaded) on applying mask and trying to unmask once any of below two events gets fired. but below both events are not even getting fired for me. can you please let me know if there is any other way to use below events or is there any specific place to use below two events.

loaded: Event fired when editor components (configuration, languages and plugins) are fully loaded and initialized. However, the editor will be fully ready to for interaction on instanceReady. CKEDITOR.on('loaded',function(e){

if(Ext.get("documentView")){

Ext.getCmp("documentView").getEl().unmask();

}

});

pluginsLoaded: Event fired when all plugins are loaded and initialized into the editor instance. CKEDITOR.on('pluginsLoaded',function(e){

if(Ext.get("documentView")){

Ext.getCmp("documentView").getEl().unmask();

}

});

Changed 3 months ago by kamalnayan

HTML file

Changed 3 months ago by kamalnayan

comment:8 Changed 3 months ago by kamalnayan

Hi Swiderski,

As I said, I have constructed a page in a clean environment without using third-party script(Ext) and I am still able to reproduce the below issue.

"Unable to get property 'window' of undefined or null reference" in scayt/plugin.js

I have attached the file and error screenshot as well. please find and kindly provide a fix for this.

Reproducible Steps:

1.Load the page (First editor section will get initialized by default).

2.Click on another editor section quickly while the page getting loaded

Attached files:

CKEditor_Test.html

Error_Screenshot.png

comment:9 Changed 2 months ago by udakiran

Hi Swiderski,

Can you please provide an update on this. This issue is now impacting more number of our application users.

Thanks, Uday

Last edited 2 months ago by udakiran (previous) (diff)

comment:10 Changed 2 months ago by j.swiderski

I have tried your sample in IE11 and I could reproduce it in CKEditor 4.5.7 - 4.5.9 but could not reproduce it starting from CKEditor 4.6.0 so please try upgrading to latest CKEditor 4.6.2.

NOTE: the error from commnet:8 is different to original error.

Are you still getting original error in CKEditor 4.6.2 and Ext. If yes, are you able to reproduce original issue without Ext?

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