3

Due to high traffic, we had to spread our website over two servers and a load balancer on top.

The master and slave servers are synced one way, from master to slave.

We set a subdomain (cms.domain.com) to point to the master server just for CMS purposes.

All seems to work fine-ish, except CKfinder and CKeditor when uploading images as the frame that they open still points to www.domain.com and that throws the following error on Chrome:

Unsafe JavaScript attempt to access frame with URL http://cms.domain.com/system/index.php?S=2cefbd42dfa263be59dd3f5a725939749a29de90&D=cp&C=content_publish&M=entry_form&channel_id=4 from frame with URL http://www.domain.com/themes/third_party/wygwam/lib/ckfinder/core/c…pload&type=Images&id=1&CKEditor=field_id_345&CKEditorFuncNum=4&langCode=en. Domains, protocols and ports must match.

Now, I read on the Wygwam changelog that on version 1.1.2 there was this fix:

Fixed file browsing and uploading for EE installs with relative Fieldtype Folder URLs and/or varying CP subdomains

Has this anything to do with what I'm trying to do?

If not, is there any way I can make this work?

Thanks.

3
  • Hey user1476 - Can you let me know what you have set for your File Upload Path for whatever folder your Wygwam field is pointing to, please? Knowing what versions you're on would help. 1.1.2 is quite old - I'm hoping you're closer to version 2.7.1 :)
    – Lisa
    May 13, 2013 at 20:52
  • The File Upload Path points to /images/uploads/somefolder... We have Wygwam 2.2.1 installed, I can try and update it to 2.7.1 and see if it makes any difference. May 14, 2013 at 14:48
  • Just updated to Wygwam 2.7.1. Now the Upload tab has disappeared and I can't find how to bring it back. On the devot-ee page for Wygwam (devot-ee.com/add-ons/wygwam) it just says: ----- Browse and Upload Files Assign one of your EE upload directories to a Wygwam field, and you’ll be able to browse and upload images, SWFs, and other files right from Wygwam, thanks to its built-in CKFinder integration. ----- Seems easy, but there's no such option and the documentation on P&T's website is rubbish. Help!!! May 14, 2013 at 15:46

1 Answer 1

1

I ran into the same issue. Even though I was using the same primary domain, the subdomains were causing cross domain issues with what seemed to be the CK Editor functionality due to permissions. I found out later that the issue was due to, in my case, NSM Live Look using iframes. Since the iframe was still technically being viewed even thought the tab was not active, the functionality from wygwam appeared to break. I wasn't able to properly use embed images and/or media. Once I disabled NSM Live Look, everything was fine with wygwam.

My solution called for a use of both though. I ended up having to restructure my site a bit in order to circumvent the issues of cross domain calling and script resources. I did this by creating rules on the firewall that block outside traffic, per corporate security rules, to any admin file. This way, the admin files were not accessible outside the network. The trick was keeping the admin file on the same domain as the site so that the CP URL and site URL are the exact in regards to full domain and not just primary domain.

This allowed me to re-enable both addons and use them without issue. Of course, this will depend on your settings and equipment usage/availability.

Your Answer

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

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