• Resolved shawfactor

    (@shawfactor)


    the gutenberg.min.js is causing a javascript conflict with ajax elsewhere on my site.

    There is a simple fix, only enqueue it where it is needed, ie in the editor. I have done so by changing plugin.php around 291 thus:

    $screen = get_current_screen();

    if ( $screen->parent_base == ‘edit’ ) {

    // Gutenberg.
    wp_enqueue_script( ‘plt-gutenberg’, $this->get_url() . ‘js/gutenberg.min.js’, array( ‘wp-edit-post’, ‘wp-element’, ‘wp-plugins’ ), self::CSS_JS_VERSION, true );

    }

    This is probaby god practice anyway, although I am sure there is a better way to do it than I have. Can this change be added to the core plugin?

    Pete

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter shawfactor

    (@shawfactor)

    Now resolved in latest version

    Hi, we also have an Javascript Error, but we have installed last WP version and last Page Links To version.

    Uncaught ReferenceError: pltVars is not defined
    at HTMLDocument.<anonymous> (quick-add.jsx:15)
    at i (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-position,jquery-u&load[]=i-sortable,jquery-ui-tooltip&ver=5.2.1:2)
    at Object.fireWith [as resolveWith] (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-position,jquery-u&load[]=i-sortable,jquery-ui-tooltip&ver=5.2.1:2)
    at Function.ready (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-position,jquery-u&load[]=i-sortable,jquery-ui-tooltip&ver=5.2.1:2)
    at HTMLDocument.J (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-position,jquery-u&load[]=i-sortable,jquery-ui-tooltip&ver=5.2.1:2)

    By now we removed latest release and we will install the stable release 2.9.2:
    Could you verify?

    Thanks a lot
    Ileana, Blulab Srl

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Javavscript conflict’ is closed to new replies.