Select2-script is conflicting with ACF
-
Hi there,
I noticed that this plugin is conflicting with Advanced Custom Fields. This seems to be because the Freshdesk-plugin is loading it’s select2-script on every options-page, so also on ACF options pages.
Please note that I do not mean the ACF field configure pages, but option-pages showing the configured fields.
What happens is that true_false checkboxes with ACF’s ‘Stylised UI’ option enabled are not visually updating when being used. See this screen capture:
https://drive.google.com/open?id=1GxpS7sPBCv7_UHNPuXNBxgl-3v0Bb0KB&authuser=dominique%40noesteijver.nl&usp=drive_fsInterestingly, the conflict is only occurring when the following plugins are activated:
– Advanced Custom Fields
– Advanced Custom Fields: Font Awesome
– Freshdesk OfficialIn my opinion the the conflict mainly originates from Freshdesk since it’s interfering on Advanced Custom Fields pages. When unloading the script that’s located in the Freshdesk plugin folder the problem is gone.
I solved this problem for myself by adding the following code to my theme:
function unload_freshdesk_select2() { $screen = get_current_screen(); if (strpos($screen->id, "acf-options") == true) { wp_deregister_script('wo_admin_select2'); } } add_action('admin_enqueue_scripts', 'unload_freshdesk_select2');I think the plugin should load it’s scripts more selectively, only on the pages where it’s actually needed and not pages of other plugins.
The topic ‘Select2-script is conflicting with ACF’ is closed to new replies.