1

I am trying to use CKFinder 3 hosted on IIS on the local html file. But I am getting the following script errorScript Error

I tried to dig in the source code. and what I found is, the language file (en.json) is getting loaded by script tag with type attribute as text/javascript which is causing the error. Can anyone help?

Teja
  • 133
  • 2
  • 13
  • Hi @Teja - most likely it is due to misconfiguration of your developement server. First related question that I've found: https://stackoverflow.com/questions/332988/get-iis6-to-serve-json-files-inc-post-get. Could you check this? – jodator Oct 31 '17 at 10:18
  • Thank you @jodator. But the MIME Type is already configured in the IIS. The issue is caused due to fetching of json file using script tag with "text/javascript" type attribute. This type of issue can be replicated on a sample html file too. Now I am looking for a way to solve this issue in ckfinder. – Teja Oct 31 '17 at 11:47
  • I know you have written "local HTML file" but are you by any chance host CKFinder on one domain but try to use it or reference it on some other? – j.swiderski Nov 06 '17 at 12:47
  • @j.swiderski Yes you got me. I am doing that. – Teja Nov 21 '17 at 10:28
  • @Teja CKFinder doesn't support that. You need to use CKFinder on the same domain where is has been installed. – j.swiderski Nov 22 '17 at 08:53
  • @j.swiderski: Yeah. Thank you. Now I'm using both on the same domain. and its working perfect. Can you tell where can I find all the client side events available for CkFinder 3 like 'onFileSelect' or 'onUploadComplete' etc. – Teja Nov 27 '17 at 06:59
  • @j.swiderski : I got the url. [Url for all Client Events](https://docs.ckeditor.com/ckfinder/ckfinder3/#!/api/CKFinder.Application). – Teja Nov 27 '17 at 11:04
  • Sorry for not seeing the comment earlier. Yes you are right. This is the correct URL. @Teja would you be willing to accept and upvote an answer if I create I create it based on our comments. That way others could know what this issue may be caused by? – j.swiderski Nov 27 '17 at 11:29
  • @j.swiderski : yeah sure. – Teja Nov 27 '17 at 15:45

1 Answers1

1

Such error is usually displayed when you have CKFinder installed on one domain but you try to use it or reference it on the other.

CKFinder doesn't allow that and currently it doesn't have a built-in support for cross-domain messaging. You need to use CKFinder on the same domain where is has been installed.

j.swiderski
  • 2,405
  • 2
  • 12
  • 20