Opened 11 years ago

Closed 11 years ago

#10731 closed Bug (fixed)

WebSpellChecker plugin breaks cloning of editor config

Reported by: Alfonso Martínez de Lizarrondo Owned by:
Priority: Normal Milestone: CKEditor 4.2.1
Component: UI : Spell Checker Version: 4.1.3
Keywords: Cc:

Description

Put this code in any page with CKEditor 4.2 (didn't test with other versions)

CKEDITOR.on('instanceReady', function (e) {
	var editor = e.editor;
	setTimeout(function () {
		console.log(editor.config);
		console.log("cloning...");
		var config = CKEDITOR.tools.clone( editor.config );
		console.log(config);
	}, 1000);

});

Load the page and check that everything works fine.

Now download and add the "wsc" or WebSpellChecker plugin to the editor http://ckeditor.com/addon/wsc

Load again the page and an error is thrown, it seems that instead of putting just simple values in the config object, the wsc plugin is doing strange things and now things no longer work as they used to.

Change History (7)

comment:1 Changed 11 years ago by Alfonso Martínez de Lizarrondo

I don't see the wsc in the github repository so I don't know how to point exactly at the problem, but it has a parseConfig method that does this:

CKEDITOR.config.wsc_stack.push(editor);

Removing that line fixes the problem and I haven't been able to find any reference to wsc_stack but even if it's used in external code, putting every editor in an array in the global CKEditor config seems like a quite crazy thing.

comment:2 Changed 11 years ago by Piotrek Koszuliński

Here's their repository https://github.com/WebSpellChecker/ckeditor-plugin-wsc

We'll investigate this and forward to them. Thanks.

comment:3 Changed 11 years ago by Alfonso Martínez de Lizarrondo

Thanks, in order to help other people finding it, maybe you can add this info to the plugin page http://ckeditor.com/addon/wsc

comment:4 Changed 11 years ago by Jakub Ś

Status: newconfirmed
Version: 4.24.0

I have noticed it is enough to add this code to standard or full version as they contain wsc plugin already and code you have specified causes JavaScript error to pop out:

Message: TypeError: CKEDITOR._.pending is undefined
code: CKEDITOR._.pending.push( [ this, arguments ] ); Line: 11
URI: /ckeditor4-git/core/editor_basic.js

Problem can be reproduced from CKEditor 4.0 (it works fine in 4.0 beta version).

comment:5 Changed 11 years ago by Piotrek Koszuliński

Version: 4.04.1.3

This issue has to be tested on ckeditor-releases or ckeditor-presets repos, because WSC has been changed in the meantime. First bad release is 4.1.3.

comment:6 Changed 11 years ago by Piotrek Koszuliński

comment:7 Changed 11 years ago by Piotrek Koszuliński

Milestone: CKEditor 4.2.1
Resolution: fixed
Status: confirmedclosed

WebSpellChecker team has fixed this issue.

I'm including this ticket to 4.2.1 to have this case included in our testing phase.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy