Viewing 11 replies - 1 through 11 (of 11 total)
  • Hey there @demaier!

    Thanks for reaching out.

    Sounds like another plugin you are using is loading a different version of Select2. Take a look at our Testing for Conflicts to see if you can find the culprit.

    Take care,
    Ed ??

    Thread Starter Daniel Maier

    (@demaier)

    Hi Ed,

    Why are you blaming this on another plugin and not yours? I get the warning coming from yours:

    Error: Option ‘multiple’ is not allowed for Select2 when attached to a <select> element.https://domain.org/wp-content/plugins/the-events-calendar/common/vendor/tribe-select2/select2.min.js?ver=4.7.15 line 21

    What about adding a check on your plugin to see if Select2 is already loaded and then not load it twice?

    I’m not passing any blame here ?? The version of Select2 that we are using is actually a bit older than others and is what is causing the conflict. I suggested Testing for Conflicts to be aware of which other plugin was using Select2. Once the other plugin is found, it would be easier to find out what other version is being called for.

    You can try this snippet (functions.php) to dequeue the version we are running and rely on the one being called by the other plugin(s). The success of this really depends on which version will ultimately be enqueued.

    function tribe_dequeue_script_example() {
    wp_deregister_script( ‘tribe-select2’ );
    }
    add_action( ‘wp_enqueue_scripts’, ‘tribe_dequeue_script_example’, 100 );
    
    add_action( ‘admin_enqueue_scripts’, ‘tribe_dequeue_script_example’, 100 );

    Other than that, I’m not sure if there are any immediate plans to start packaging a newer version of Select2 or not. I’ll look into it a bit more.

    Hope that helps!

    Thread Starter Daniel Maier

    (@demaier)

    Thanks Ed.

    It seems you guys just released a patch for this:

    = [4.4.29.2] 2018-07-12 =

    Fix – A conflict with select2 loading on the editors for WooCommerce Membership causing an ‘ajax’ error in the console [110441]

    You’re welcome. Did that release fix the AJAX error for you?

    Hey there,

    Since this thread has been inactive for a while, I’m going to go ahead and mark it as resolved. Don’t hesitate to create a new thread any time you help again!

    Ed ??

    Thread Starter Daniel Maier

    (@demaier)

    Yes, that fixed it for me.

    FYI, The “Notify me of follow-up replies via email” in this post doesn’t work for me.

    Thanks!

    There is a better way! If you change the version of select2 that ACF uses everything works fine. At least with widgets, which is where I was having the issue. ACF makes it easy to change settings

    function acf_setting(){
     acf_update_setting('select2_version', 3);
    }
    
    add_action('acf/init', 'acf_settings' );
    Thread Starter Daniel Maier

    (@demaier)

    H. Adam Lenz, if you update the plugin it should fix the issue as it did for me.

    Thanks.

    • This reply was modified 6 years, 5 months ago by Daniel Maier.

    I think this was a different case as it was with acf pro being used to make widgets and the event calendar pro widgets. When both were in a side bar on the widgets edit screen, select2 would not work and produced the same error

    Thread Starter Daniel Maier

    (@demaier)

    Got it! Thank you.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Dashboard JavaScript error’ is closed to new replies.