Error with select2

Home Forums Ticket Products Event Tickets Plus Error with select2

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1572676
    Mohammad Zubair
    Participant

    Hi,

    There is a conflict between WooCommerce Memberships and Event Tickets from Tribe. I hired a dev to look at it, and this was his solution:

    Unfortunately there is no way I can do it without the file edit. Normally I could dequeue the file but because of the convoluted way Event TIckets is enqueing the file this is impossible. All this means is that when you update the event tickets plugin you update and then check for this error, if it has the error you open event-tickets/common/src/Tribe/Main.php and search for trible-select2 – comment out this line

    array( ‘tribe-select2’, ‘vendor/tribe-select2/select2.js’, array( ‘jquery’ ) ),

    Making it

    //array( ‘tribe-select2’, ‘vendor/tribe-select2/select2.js’, array( ‘jquery’ ) ),

    And that will reapply the fix. Currently it is line 176 of that file.

    Will Tribe fix this in an update? So we don’t have to change the file every update.

    Thanks!

    #1573880
    Mario
    Participant

    I applied the same hack and it works (temporary, waiting for TEC fix)….

    #1573897
    Sky
    Keymaster

    Hi there,

    I’m sorry to hear that you’re having problems with this. I will try to help get this sorted.

    This problem happens due to our plugins using a different version of the Select2 library than what other plugins are using.

    To solve this problem, please try adding the following code snippet to your child theme’s functions.php file, or a functionality plugin.


    // Disable tribe select2 function when not in tribe admin screens
    function tribe_select2_conflict_fix() {
    $admin_helpers = Tribe__Admin__Helpers::instance();
    if ( ! $admin_helpers->is_screen() ) {
    wp_deregister_script( 'tribe-select2' );
    }
    }
    add_action( 'admin_enqueue_scripts', 'tribe_select2_conflict_fix', 11);

    You should remove any other customizations you did to the core plugin files.

    Let me know if that works for you!

    Thanks,
    Sky

    #1574480
    Mohammad Zubair
    Participant

    It seems like it is fixed now by an update of The Events Calendar PRO, specific for this WooCommerce Membership & Events Calendar problem. So this fix is not needed anymore?

    #1574562
    Mario
    Participant

    I tested the new version of The Event Calendar Pro and it fixes the issue. No any other hack is needed (including the custom code on this thread).

    Problem is solved.

    #1574711
    Sky
    Keymaster

    Hi again,

    It looks like there was a fix pushed out in an update of TEC Pro yesterday that has addressed this specific issue.

    You will no longer need the snippet provided earlier.

    Thanks,
    Sky

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Error with select2’ is closed to new replies.