2b3ez / FileManager4TinyMCE

Plugin for manage and upload file for TinyMCE 4
151 stars 74 forks source link

Unable to use when files and images are stored on CDN #10

Closed bobbytackett closed 11 years ago

bobbytackett commented 11 years ago

I have all JS, image, CSS on a CDN subdomain. I am able to upload and see the thumbnails which are on the CDN, but when I go to select the image for use with TinyMCE I receive the following. Blocked a frame with origin "http://cdn.example.com" from accessing a frame with origin "http://dash.example.com". Protocols, domains, and ports must match. Uncaught TypeError: Cannot call method 'getElementsByClassName' of undefined

arndta commented 11 years ago

http://javascript.info/tutorial/same-origin-security-policy

I would imagine the error is occurring when FileManager4TinyMCE is attempting to get a handle to the parent TinyMCE window to set the url field for the image. I don't know how you would get around that while still hosting the different components on different sub-domains. The simple answer is to host both the page with TinyMCE and the FileManager4TinyMCE files on the same sub-domain, unless I'm misunderstanding the problem.