6

I have integrated CK Editor 4.2.1 in Tridion 2011 CMS.

While opening the CK editor in Internet Explorer a JavaScript conflict occurred between the CMS and CK Editor minified JavaScript, which results in CK editor in disabled mode. But Chrome and Firefox seems to work fine.

The error thrown is

SCRIPT5009: 'Q' is undefined

When I use non-minified JavaScript for either CMS or CK editor, the issue seems to resolve. I just want to know how can I resolve this issue without making non minified JavaScript.

Does anyone have any idea on this issue?

3
  • What version(s) of IE are throwing JS errors - or is it all of them? Oct 1, 2013 at 17:46
  • Well, its throwing the error in all the versions including IE 10.
    – Indra
    Oct 2, 2013 at 19:39
  • When you say you use the unminified JS for either the CK editor or the CME it works, are you including the CK editor as minified code? Could you try including the CK code unminified if so and let the CME try and minify it? You could try running all your code through JS hint to look for syntax issues. If you can this would make a great open source project too. Dec 1, 2013 at 9:58

3 Answers 3

1

Let me start by saying that I find it pretty cool that you managed to integrate CK with Tridion, I have had people ask me for that multiple times, but they would normally give up once they understood that Tridion-specific features like component linking would be anywhere between hard to impossible to implement, and I unfortunately never gave it a try myself.

2nd, this question really seems to not have much to do with Tridion and the lack of answers here is a good indicator that nobody has tried what you're doing before (or nobody ran into the same issue) so we'll need a bit more detail than what you provided so far.

Anyway you can try to debug where 'Q' is used? Which library is used to minify CK? Any additional error visible in a javascript console? Are there perhaps warnings in Chrome/Firefox that those browsers can work around?

2
  • Chrome and Firefox don't show any warnings/errors. Below is dynamically generated script where in 'Q' is being used: void(function(){document.open();(function(){for(var a;Q;)try{a=window.parent.document.domain;break}catch(b){a=a?a.replace(/.+?(?:\.|$)/,M):document.domain;if(!a)break;document.domain=a}return !!a})();document.close();}())
    – Indra
    Oct 2, 2013 at 20:01
  • 1
    hey @user662 - this sounds like a really interesting integration, perhaps you could open source it and get some other developers to help debug it for you :)
    – johnwinter
    Nov 30, 2013 at 18:55
1

We have created a UI-extension using ckeditor to support paste-as functionality for Tridion 2011 sp1, we faced similar issue in IE and did not find solution for it.

We have submitted this extension to SDL, so that other can use it/improve it if required, still waiting for approval to get it listed on extension store.

1

Old post...but someone may find use for this. Open the ckeditor.js file and find the fucntion for fixDomain. Comment out the section as below:

fixDomain:function(){/*for(var a;;)try{a=window.parent.document.domain;break}catch(b){a=a?a.replace(/.+?(?:\.|$)/,""):document.domain;if(!a)break;document.domain=a}return!!a*/return document.domain}

And poof...the item will work. We are still on IE9. Good luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.