• Resolved julietta2801

    (@julietta2801)


    After the the last update I noticed that the Essential grid (ver. 2.2.4 and 2.2.4.1) backend is not working (scripts are inactive). CMB2 version 2.4.1.

    That’s what I see in console:

    admin.js?ver=2.2.4:2215 Uncaught TypeError: CodeMirror.fromTextArea is not a function
    at Object.t.initCreateGrid (admin.js?ver=2.2.4:2215)
    at HTMLDocument.<anonymous> (admin.php?page=essen…reate&create=1:6205)
    at i (load-scripts.php?c=1…lupload&ver=4.9.6:2)
    at Object.fireWith [as resolveWith] (load-scripts.php?c=1…lupload&ver=4.9.6:2)
    at Function.ready (load-scripts.php?c=1…lupload&ver=4.9.6:2)
    at HTMLDocument.K (load-scripts.php?c=1…lupload&ver=4.9.6:2)
    admin.js?ver=2.2.4:1448 Uncaught TypeError: Cannot read property ‘getValue’ of null
    at HTMLAnchorElement.<anonymous> (admin.js?ver=2.2.4:1448)
    at HTMLAnchorElement.dispatch (load-scripts.php?c=1…lupload&ver=4.9.6:3)
    at HTMLAnchorElement.r.handle (load-scripts.php?c=1…lupload&ver=4.9.6:3)
    wp-auth-check.min.js?ver=4.9.6:1 Uncaught TypeError: Cannot read property ‘hasClass’ of undefined
    at HTMLDocument.<anonymous> (wp-auth-check.min.js?ver=4.9.6:1)
    at HTMLDocument.dispatch (load-scripts.php?c=1…lupload&ver=4.9.6:3)
    at HTMLDocument.r.handle (load-scripts.php?c=1…lupload&ver=4.9.6:3)
    at Object.trigger (load-scripts.php?c=1…lupload&ver=4.9.6:3)
    at Object.a.event.trigger (load-scripts.php?c=1…lupload&ver=4.9.6:9)
    at HTMLDocument.<anonymous> (load-scripts.php?c=1…lupload&ver=4.9.6:3)
    at Function.each (load-scripts.php?c=1…lupload&ver=4.9.6:2)
    at a.fn.init.each (load-scripts.php?c=1…lupload&ver=4.9.6:2)
    at a.fn.init.trigger (load-scripts.php?c=1…lupload&ver=4.9.6:3)
    at Object.<anonymous> (heartbeat.min.js?ver=4.9.6:1)

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Probably very similar thing as to what’s over at https://github.com/CMB2/CMB2/issues/1110

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Curious about answers to Justin’s questions found in https://github.com/CMB2/CMB2/issues/1110#issuecomment-374925395 for your situation, specifically if they bundled the library themselves, etc

    Thread Starter julietta2801

    (@julietta2801)

    I see the only solution now is to switch to the older version of CMB2, but I can’t find it and WP Rollback is not showing any previous version.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    No, not necessarily rolling back CMB2, because from what I’ve seen at least, the errors aren’t directly involving CMB2 itself. For example with the first line from the error:

    admin.js?ver=2.2.4:2215 Uncaught TypeError: CodeMirror.fromTextArea is not a function

    CMB2 doesn’t have an admin.js file. As Justin mentions: “It looks like Revolution slider is likely using an old version of CodeMirror. WordPress now bundles CodeMirror in core, so they should update their plugin to work with that version.” This may be the same case for Essential Grid. May also just be a case of the updated CMB2 is managing to expose the need for the other element needing the upgrade, or to use the bundled version in WP core.

    That said, if you absolutely feel you must, you can acquire previous versions of CMB2 over at https://github.com/CMB2/CMB2/releases and click the “Source code” link for the intended version you want.

    moultrex

    (@moultrex)

    Comment out this code on

    /wp-content/plugins/cmb2/includes/CMB2_JS.php

    line: 234

    //if ( function_exists( ‘wp_enqueue_code_editor’ ) ) {
    // $l10n[‘defaults’][‘code_editor’] = wp_enqueue_code_editor( array(
    // ‘type’ => ‘text/html’,
    // ) );
    //}

    It causes other trouble to with other plugins. For example Wp Export All and Wp All import from http://www.wpallimport.com

    • This reply was modified 8 years ago by moultrex.
    Thread Starter julietta2801

    (@julietta2801)

    It helped with comment out the code, now works fine with Essential Grid.

    Thank you!

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    The problem I have with this, even if it does technically work, is that it disables CMB2 functionality that is enqueuing valid WordPress core functionality, to fix issues coming from other plugins. In my mind, it’s be better if someone did revert to the previous version of CMB2 until these other plugins get caught up, but also the other plugins should be let know about the errors coming from something like wp_enqueue_code_editor having ‘text/html’ set for its type. Not saying it’s not good to update plugins as new releases are made, but at times, it’s better than hacking away at its features 😀

    Thread Starter julietta2801

    (@julietta2801)

    The new update 2.4.2 fixed the conflict with Essential grid, but now another problem, it breaks the XML sitemap. I got the notification from search engines Yandex and Google about errors in my sitemap. That’s what I have:

    This page contains the following errors:
    error on line 2 at column 6: XML declaration allowed only at the start of the document
    Below is a rendering of the page up to the first error.

    All common solutions like deleting whitespaces and so on didn’t help. Only deactivating CMB2.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    I am honestly not sure what’s going on with that part, because CMB2 itself shouldn’t be having any sort of effect that I can think of, on generated XML and sitemaps. The first step I’d end up taking is leaving it activated, and temporarily removing all metaboxes that have been created via deleted or commented out code, and seeing if the error/issue goes away. Then, slowly start re-adding the code until the error comes back. If anything, you would find a possible source of issue.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Conflict with Essential grid (JS/CSS errors)’ is closed to new replies.