Magento – Uncaught DOMException: Blocked a Frame with origin from accessing a cross origin-frame

javascriptmagento-1.9tinymce

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

Best Answer

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