Home › Forums › Calendar Products › Events Calendar PRO › Select2 Library error with Generate Press Premium plugin in Customizer
- This topic has 5 replies, 2 voices, and was last updated 8 years, 5 months ago by
David.
-
AuthorPosts
-
November 20, 2017 at 9:28 pm #1387722
David
ParticipantThe 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.”
November 21, 2017 at 1:01 pm #1388544Patricia
MemberHey 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
November 21, 2017 at 1:08 pm #1388550David
ParticipantHi 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
November 22, 2017 at 8:38 am #1389150Patricia
MemberHi 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
December 14, 2017 at 8:36 am #1405607Support Droid
KeymasterHey 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 -
AuthorPosts
- The topic ‘Select2 Library error with Generate Press Premium plugin in Customizer’ is closed to new replies.
