[wp-trac] [WordPress Trac] #20094: The wpEditImage TinyMCE plugin is broken when TinyMCE is served from another domain

WordPress Trac noreply at wordpress.org
Wed Apr 29 13:57:14 UTC 2015


#20094: The wpEditImage TinyMCE plugin is broken when TinyMCE is served from
another domain
---------------------------------------+---------------------
 Reporter:  mdawaffe                   |       Owner:  azaozz
     Type:  defect (bug)               |      Status:  closed
 Priority:  normal                     |   Milestone:  4.0
Component:  TinyMCE                    |     Version:
 Severity:  normal                     |  Resolution:  fixed
 Keywords:  needs-patch needs-refresh  |     Focuses:
---------------------------------------+---------------------
Changes (by mdgross):

 * version:  2.6 =>


Comment:

 I think this may be related. We have defined the following in wp-
 config.php


 {{{
 define('WP_CONTENT_DIR', '/var/www/vhosts/cdn.domain.com/wp-content');
 define('WP_CONTENT_URL', 'http://cdn.domain.com/wp-content');
 }}}

 We have also created a custom TinyMCE button


 {{{
 add_filter('mce_external_plugins', array($this, 'add_tinymce_plugin'));
 add_filter('mce_buttons', array($this, 'register_tinymce_button' ));
 }}}

 The button is appearing but fails when clicked. According to console:

 '''Error: Permission denied to access property "tinymce"
 tinymce = tinyMCE = parentWin.tinymce;'''

 I believe this is happening because WordPress is being served from
 http://www.domain.com but the popup is being served from
 http://cdn.domain.com. It works perfectly without WP_CONTENT_URL and
 WP_CONTENT_DIR. Please advise.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/20094#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list