[wp-trac] [WordPress Trac] #55054: Call to wp_editor() produces fatal error - tinymce not found or invalid
WordPress Trac
noreply at wordpress.org
Wed Feb 2 22:22:11 UTC 2022
#55054: Call to wp_editor() produces fatal error - tinymce not found or invalid
--------------------------------+-----------------------------
Reporter: burnside | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: TinyMCE | Version: 5.9
Severity: major | Keywords:
Focuses: ui, administration |
--------------------------------+-----------------------------
I have created some plugins which customize the toolbar for the editor
when used as the textarea for certain form fields. Here is an example of
the lines of code which will produce a fatal error:
{{{
$args = array(
'tinymce' => array(
'toolbar1' => 'bold,italic,bullist,link,unlink',
)
);
wp_editor( $editor_content, $editor_id, $args );
}}}
----
Error in logs:
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
----
These errors did occur in version 5.8.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55054>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list