0

I have a Magento 1.9 site that uses TinyMCE. Everything worked fine until I added a cdn. The script wouldn't load because it was on a different domain. I went ahead and added a subdomain but it still doesn't work. When I started troubleshooting I came across this http://archive.tinymce.com/wiki.php/TinyMCE3x:How-to_load_TinyMCE_crossdomain

I changed the header of the script to-

//Uncomment and change this document.domain value if you are loading the script cross subdomains
  document.domain = "assets.example.com";

At the end of the script I also added (in bold)-

**document.domain = 'assets.example.com';**tinyMCEPopup.init();

Still doesn't work. The errors I am getting are-

Uncaught DOMException: Blocked a frame with origin "https://assets.example.com" from accessing a cross-origin frame.
at Object.init (https://assets.example.com/js/tiny_mce/tiny_mce_popup.js:5:106)
at https://assets.example.com/js/tiny_mce/tiny_mce_popup.js:5:4810
init @ VM1187 tiny_mce_popup.js:5
(anonymous) @ VM1187 tiny_mce_popup.js:5
mctabs.js:13 Uncaught TypeError: Cannot read property 'windowManager' of undefined
at new MCTabs (mctabs.js:13)
at mctabs.js:119
MCTabs @ mctabs.js:13
(anonymous) @ mctabs.js:119
form_utils.js:11 Uncaught TypeError: Cannot read property 'baseURI' of undefined
at form_utils.js:11
(anonymous) @ form_utils.js:11
VM1187 tiny_mce_popup.js:5
Uncaught TypeError: Cannot read property 'plugin_url' of undefined
at Object.getWindowArg (VM1187 tiny_mce_popup.js:5)
at Object.requireLangPack (VM1187 tiny_mce_popup.js:5)
at link.js:1

2 Answers 2

0

it happend beacause you use parallel download paths. change back js path to origin and will be ok. I have the same here, i can't find a solution for that

0

When you set the CDN for JS, Magento gives you a clear warning

Warning! When using CDN, in some cases JavaScript may not run properly if CDN is not in your subdomain

You need to either get a CDN that allows you to set a domain name on it cdn.yoursite.com or don't put the JS on a CDN.

System=>Configuration=>General=>Web=>Unsecure=>Base JavaScript URL and set it to {{unsecure_base_url}}js/

cdn warning

Your Answer

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

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