Select2 Library error with Generate Press Premium plugin in Customizer

Home Forums Calendar Products Events Calendar PRO Select2 Library error with Generate Press Premium plugin in Customizer

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1387722
    David
    Participant

    The Events Calendar has a conflict with the Generate Press Premium plugin. It appears that you’re loading the Select2 library but not limiting it to Event Calendar admin options. The issue here is similar to the recently reported issues with SearchWP conflicts in the admin area.

    I tested activating/deactivating Event Calendar and can replicate the issue consistently. We discovered this in our dev environment, thankfully.

    The author of the Generate Press Premium plugin responded:

    “It looks like they’re loading the same library as us (Select2) to have more advanced select boxes. However, their selector isn’t specific to their options, so their version is overriding our version, causing a conflict.

    It doesn’t actually look like they even use it in the Customizer, so the best thing they can do is prevent select2 (the library) from initiating inside the Customizer.

    Might be worth opening up a support ticket with them – if they need more info or have any questions just let me know.”

    #1388544
    Patricia
    Member

    Hey David,

    Thank you for reaching out to us!

    To get started, could you please let me know if the issue persists even after updating The Events Calendar to version 4.6.5? I’m asking this because there was an issue with the select2 library that was fixed last week.

    Thanks!

    Patricia

    #1388550
    David
    Participant

    Hi Patricia,

    Thanks for the quick response. I submitted our system settings with my original post. It shows version 4.6.5 is installed. So, whatever was in last batch of fixes doesn’t seem to have resolved this issue.

    Regards,

    David

    #1389150
    Patricia
    Member

    Hi David,

    Thanks for your confirmation! In the Customize area, the select2 library is mainly used in our widgets.

    You can remove the select2 library from The Events calendar by adding the following snippet to your theme’s functions.php file:

    https://gist.github.com/nefeline/0bf2847962ee27089b6b40e69c673560

    Please note that if you use this code to remove the Select2 library from The Events Calendar and don’t replace it with your own version of Select2, JavaScript will break on many pages.

    It is also possible to remove the select2 library only from the customizer page with this snippet:

    add_action( 'customize_controls_print_scripts', 'tribe_disable_select_js', 20 );
    add_action( 'customize_controls_print_styles', 'tribe_disable_select_css', 20 );

    function tribe_disable_select_js() {
    wp_deregister_script( 'tribe-select2' );
    wp_dequeue_script( 'tribe-select2' );
    }

    function tribe_disable_select_css() {
    wp_deregister_style( 'tribe-select2-css' );
    wp_dequeue_style( 'tribe-select2-css' );
    }

    I hope this helps. If you have any other questions in the meantime, please feel free to let me know and I’d be happy to help as best I can!

    Cheers,

    Patricia

    #1405607
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Select2 Library error with Generate Press Premium plugin in Customizer’ is closed to new replies.