Support » Plugin: Jetpack by WordPress.com » 5.2 breaks Text and TinyMCE widgets

  • Resolved IanWaring

    (@ianwaring)


    The latest Jetpack breaks the Text and TinyMCE widgets – can’t enter any text in the boxes without errors. On trying to get focus in text box to enter content, getting:

    Uncaught ReferenceError: grunionEditorView is not defined
    at b.(anonymous function).b.(anonymous function).init

    and goes downhill from there.

Viewing 15 replies - 1 through 15 (of 22 total)
  • Yes, nearly the same here. In my widgets area I can’t edit Black Studio TinyMCE-Widgets.

    Same for me with stock text widget too. Installed WP-Rollback, went back to Jetpack 5.1 and everything works again. Holding off updating Jetpack until fixed (have logged it as a bug).

    Have the problem on at least three installations (I looked at). One single and two multisites. Rollback fixes it.

    5.2.1 does not fix the problem. Downgrading does.

    Yep, agreed. Bug is still there in 5.2.1

    Dan

    (@desperanza)

    Have the same problem here. The same error message. Deactivating Jetpack fix the problem. 🙁

    Rolled back Jetpack to 5.1 and visual editor and text widgets work again. Thanks for the tip!

    Thanks for the info. WP-Rollback ftw!

    I also had this problem. Using the WP-Rollback program fixed the issue with editing TinyMCE-based widgets in my widget area. It did not seem to affect TinyMCE widgets in my page builder plugin (SiteOrigin), however. Indeed, both Jetpack 5.2 and 5.2.1 still have the bug. Rolling Jetpack back to 5.1 fixed it right away.

    Hi there,
    I am the author of Black Studio TinyMCE Widget and I had a look into this. The problem is that Jetpack loads some of its javascript stuff only on the post screen and not on the widgets screen, and unfortunately it does not provide any hook to force the loading from an external plugin.

    In particular. the issue is caused by the following snippet in function handle_editor_view_js() in file jetpack/modules/contact-form/grunion-editor-view.php:

    
    if ( ! isset( $current_screen->id ) || $current_screen->base !== 'post' ) {
    	return;
    }
    

    So a quick fix would be to remove that snippet (which would force the javascript stuff to be loaded on all the admin pages).
    A more robust fix would be to add the widget.php screen to the conditions that trigger the inclusion of the scripts, and/or provide a filter hook to allow other devs to change that behavior based on custom conditions.

    Ok working

    Tried your fix and now i’m using the new contact form within your widget.

    Mille grazie Marco

    • This reply was modified 3 months, 2 weeks ago by  RaulOne.

    I use TinyMCE as well. Jetpack 5.2.1 breaks it. I had to roll-back to Jetpack 5.1. Waiting for a fix.

    Jetpack 5.2.1 also breaks the editor for our mapping plugins Leaflet Maps Marker and Maps Marker Pro – it would be much appreciated if the Jetpack scripts wouldnot be loaded on other plugins pages, which also add the TinyMCE editor

    I am encountering the same problem as reported by others here. Jetpack 5.2 has introduced a bug for usage of TinyMCE outside of “post” screens.

    For anyone having this problem, please add the code below to your theme functions.php file (or even better create a new plugin and paste the code there), it will disable the JetPack “Contact Form” button in TinyMCE on the whole site.

    This, of course, should be used only as a temporary solution until JetPack developers will fix it properly.

    
    add_filter( "init", "disable_grunion", 1000 );
    function disable_grunion() {
        remove_action( 'admin_notices', array( "Grunion_Editor_View", 'handle_editor_view_js' ) );
        remove_filter( 'mce_external_plugins', array( "Grunion_Editor_View", 'mce_external_plugins' ) );
        remove_filter( 'mce_buttons', array( "Grunion_Editor_View", 'mce_buttons' ) );
        remove_action( 'admin_head', array( "Grunion_Editor_View", 'admin_head' ) );
    }
    

    Hope it helps!

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