[wp-trac] [WordPress Trac] #31578: Any wp_editor instances would break on RTL languages

WordPress Trac noreply at wordpress.org
Tue Mar 10 01:11:07 UTC 2015


#31578: Any wp_editor instances would break on RTL languages
--------------------------+-----------------------------
 Reporter:  maimairel     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  TinyMCE       |    Version:  4.1.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Hi there, there's an issue with RTL languages and additional `wp_editor`
 instances. I'll describe the two things that happened on this ticket.

 1. When adding any additional `wp_editor` instances on RTL languages, the
 function `_mce_set_direction` would produce a PHP warning.

 This is caused by `wp-includes/functions.php`, line 2904 on WP 4.1.1:

 `$input['plugins'] .= ',directionality';`

 This is because the settings array in `_WP_Editors::editor_settings` does
 not have the `plugins` property anymore after the first init.

 2. The fatal issue would be this one, where the code in step 1 caused
 another issue on the following initialization JS code.

 `init = tinyMCEPreInit.mceInit[edId] = tinymce.extend( {}, firstInit,
 tinyMCEPreInit.mceInit[edId] );`

 `tinymce.extend` would normally extend the editor settings object with a
 `plugins` property, but because of the code in `_mce_set_direction` the
 settings object already has the `plugins` property with a value of
 `,directionality`

 This caused the additional tinymce instance to display the default
 buttons.

 I hope this gets resolved soon!

 Thank you!

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31578>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list