Skip to:
Content
Pages
Categories
Search
Top
Bottom

Gutenberg breaks BuddyPress


  • jamescushing
    Participant

    @jamescushing

    Having updated today to WordPress 5.0.3 (and running BuddyPress 4.1.0) textarea fields (e.g. in the registration form) no longer show the TinyMCE editor. This is because with Gutenberg enabled wp_editor() doesn’t work, which is what the textarea field type uses:

    /wp-content/plugins/buddypress/bp-xprofile/classes/class-bp-xprofile-field-type-textarea.php:90-118

    
    /**
    * Filters the arguments passed to <code>wp_editor()</code> in richtext xprofile fields.
    *
    * @since 2.4.0
    *
    * @param array $args {
    *     Array of optional arguments. See <code>wp_editor()</code>.
    *     @type bool $teeny         Whether to use the teeny version of TinyMCE. Default true.	 *     @type bool $media_buttons Whether to show media buttons. Default false.
    *     @type bool $quicktags     Whether to show the quicktags buttons. Default true.
    *     @type int  $textarea_rows Number of rows to display in the editor. Defaults to 1 in the
    *                               'admin' context, and 10 in the 'edit' context.
    * }
    * @param string $context The display context. 'edit' when the markup is intended for the
    *                        profile edit screen, 'admin' when intended for the Profile Fields
    *                        Dashboard panel.
    */
    $editor_args = apply_filters( 'bp_xprofile_field_type_textarea_editor_args', array(
    	'teeny'         => true,
    	'media_buttons' => false,
    	'quicktags'     => true,
    	'textarea_rows' => 10,
    ), 'edit' );
    
    wp_editor(
    	bp_get_the_profile_field_edit_value(),
    	bp_get_the_profile_field_input_name(),
    	$editor_args
    );
    

    The console shows the error “Uncaught ReferenceError: tinymce is not defined” which is apparently located in the tinyMCEPreInit script definition at the foot of the page.

    Any ideas?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar