gonna try in parts, sorry to get upset but rarely I've encountered such a bad an annoying spam filter:
Ok so I develop in FF and all works perfect but in IE and Chrome I get this error:
Uncaught SecurityError: Failed to read the 'frame' property from 'Window': Blocked a frame with origin "domain1" from accessing a frame with origin "domain2". Protocols, domains, and ports must match.
I exclusively use inline editing and I thought CKeditor does not use an iframe for that? But I guess looking at the error I'm wrong about that.
What I'm doing is I load CKeditor on domain2 but it is not activated. Then when domain2 is loaded in an iframe on domain1 the CKeditor is activated on certain elements.
Like I said it works perfect in FF (latest version) but in both IE and Chrome (latest versions) I get the above error. I'm using CKeditor 4.4.6 (just updated to see if that solved the problem but it didn't )
Now I found somebody with exact same problem and they solved it here:
github com /RainLoop/rainloop-webmail/commit/06274c6a7c2fdd0561850de637f53cef57906fad#diff-d8d30ff895f78b17eee80b2dd06b6b94
by modifying CKeditor core files (on version 4.4.4) which I try to avoid like the plague for obvious reasons..
Anybody has any idea how to better solve this problem? Thank you!
Hmm weird.. I just setup a small simple test doing pretty much the same and no error
I do think it is a bug in CKeditor because it is an uncatched error however I'm not sure if the actual probleme is in CKeditor or somewhere else..
I'll have a look if I can make the URL where the proble occurs public
But with my CKbuilder version (error) or just full version (no error) there are no differences there.. so prob means some plugin calls 'getFrame' function and then generates exception (which would still mean this is a CKeditor bug altough initiated from a plugin)
The error is not caused by any plugin code specifically but by this function:
damn freakin annoying spam filter again arrhg - see post below
which I have no idea what it does exactly, and which is apparently only executed (included?) when using the CKBuilder. Any help would be much appreciated!
gonna try in parts, sorry to
gonna try in parts, sorry to get upset but rarely I've encountered such a bad an annoying spam filter:
Ok so I develop in FF and all works perfect but in IE and Chrome I get this error:
I exclusively use inline editing and I thought CKeditor does not use an iframe for that? But I guess looking at the error I'm wrong about that.
What I'm doing is I load CKeditor on domain2 but it is not activated. Then when domain2 is loaded in an iframe on domain1 the CKeditor is activated on certain elements.
Like I said it works perfect in FF (latest version) but in both IE and Chrome (latest versions) I get the above error. I'm using CKeditor 4.4.6 (just updated to see if that solved the problem but it didn't )
Now I found somebody with exact same problem and they solved it here:
github com /RainLoop
github com /RainLoop/rainloop-webmail/commit/06274c6a7c2fdd0561850de637f53cef57906fad#diff-d8d30ff895f78b17eee80b2dd06b6b94
by modifying CKeditor core files (on version 4.4.4) which I try to avoid like the plague for obvious reasons..
Anybody has any idea how to better solve this problem? Thank you!
set up a test
Hmm weird.. I just setup a small simple test doing pretty much the same and no error
I do think it is a bug in CKeditor because it is an uncatched error however I'm not sure if the actual probleme is in CKeditor or somewhere else..
I'll have a look if I can make the URL where the proble occurs public
Ok so for some reason the
Ok so for some reason the error does not pop-up when I use CDN version but it does when using a local version:
Using CKeditor CDN:
http://affiliatesk.in/test.php?loc=1
Using locally hosted (build using the CkBuilder app on this site, no further edits done)
http://affiliatesk.in/test.php
(diff: https://www.diffchecker.com/jdpk7kwk)
I'll try an exact self-hosted copy vs the one build using CKBuilder next
ok damn, after furter testing
ok damn, after furter testing conclusion is that the error comes from one of the plugins I've selected, now I need to figure out which one...weird thing is though that error when it happens is in line 65
But with my CKbuilder version (error) or just full version (no error) there are no differences there.. so prob means some plugin calls 'getFrame' function and then generates exception (which would still mean this is a CKeditor bug altough initiated from a plugin)
The error is not caused by
The error is not caused by any plugin code specifically but by this function:
which I have no idea what it does exactly, and which is apparently only executed (included?) when using the CKBuilder. Any help would be much appreciated!
this.frame = this.win
function k(a, d) {
function k(a, d) {
CKEDITOR.tools.extend( this, {
editor: a,
editable: a.editable(),
doc: a.document,
win: a.window,
}, d, !0);
}
this.frame = this.win.getFrame();
this.inline = this.editable.isInline();
this.target = this[this.inline ? "editable" : "doc"]
}
ok so adding the code line by line doesn't trigger the stupid 'spam filter'.. like I said before this must be the worst and dumbest spam filter ever
finally found the culprit
finally found the culprit today..
After all it IS a plugin: 'lineutils'
This plugin is not part of the 'full package' but is required for a lot of other plugins.
The original function causing the problem:
function Finder( editor, def ) {
CKEDITOR.tools.extend( this, {
editor: editor,
editable: editor.editable(),
doc: editor.document,
win: editor.window
}, def, true );
this.frame = this.win.getFrame();
this.inline = this.editable.isInline();
this.target = this[ this.inline ? 'editable' : 'doc' ];
}
ok I've created a bug report
ok I've created a bug report for this one:
https://dev.ckeditor.com/ticket/12767
I've now quickly solved it with:
function Finder( editor, def ) {
CKEDITOR.tools.extend( this, {
editor: editor,
editable: editor.editable(),
doc: editor.document,
win: editor.window
}, def, true );
var a = false;
try{
a = this.win.getFrame();
}catch(e){/*console.log('getframe error:');console.log(editor);console.log(def);*/}
this.frame = a;
this.inline = this.editable.isInline();
this.target = this[ this.inline ? 'editable' : 'doc' ];
}
I have no idea how viable this is as a real solution though
I've created a PR for this
I've created a PR for this issue:
https://github.com/ckeditor/ckeditor-dev/pull/153
nice, thanks!
nice, thanks!