[wp-trac] [WordPress Trac] #55012: TinyMCE editor not rendering correctly in visual mode using wp_editor function in a meta box on a page with the Block editor enabled in WP 5.9

WordPress Trac noreply at wordpress.org
Wed Feb 2 00:54:36 UTC 2022


#55012: TinyMCE editor not rendering correctly in visual mode using wp_editor
function in a meta box on a page with the Block editor enabled in WP 5.9
--------------------------+------------------------------
 Reporter:  rickcurran    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  TinyMCE       |     Version:  5.9
 Severity:  major         |  Resolution:
 Keywords:                |     Focuses:  ui, javascript
--------------------------+------------------------------

Comment (by burnside):

 I'm seeing a similar issue on my dev site. The following line of code will
 produce a fatal error:


 {{{
 $args = array(
   'tinymce' => array(
     'toolbar1' => 'bold,italic,bullist,link,unlink',
    )
 );
 wp_editor( $editor_content, $editor_id, $args );
 }}}

 Error:

 PHP Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1
 ($callback) must be a valid callback, function "tinymce" not found or
 invalid function name in /nas/content/live/dev/wp-includes/class-wp-
 hook.php:307

 Stack trace:\n#0 /nas/content/live/dev/wp-includes/plugin.php(189):
 WP_Hook->apply_filters('html', Array)\n#1 /nas/content/live/dev/wp-
 includes/general-template.php(3519): apply_filters('wp_default_edit...',
 'html')\n#2 /nas/content/live/dev/wp-includes/class-wp-editor.php(183):
 wp_default_editor()\n#3 /nas/content/live/dev/wp-includes/general-
 template.php(3547): _WP_Editors::editor('Abstract and bi...', 'content',
 Array)\n#4 /nas/content/live/dev/wp-admin/edit-form-advanced.php(604):
 wp_editor('Abstract and bi...', 'content', Array)\n#5
 /nas/content/live/dev/wp-admin/post.php(206):
 require('/nas/content/li...')\n#6 {main}\n thrown in /nas/content/live/dev
 /wp-includes/class-wp-hook.php on line 307

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


More information about the wp-trac mailing list