Home › Forums › Backend Issues (wp-admin) › ACF & Yoast Seo Conflict Issue
Hello ACF support team,
As I’m a WP developer and working on my customer websites, They have ACF pro and I’m working on them, Anyway, the problem is When loading the “Select2” JS library with Yoast Seo, The taxonomy ordering on the multi-select box not working and a Js error came up on the browser console, This issue fixed on the latest version v5.10.1 but still, the ordering not working after/before save and can’t change the taxonomies orders as a custom order when adding them into the box.
Now I downgrade them to the v5.9.9 with this custom code as I’ve written, It’s for an example and everything working well again:
// Fix Yoast SEO & ACF select2 conflict
function fixYoastAndAcf() {
if ( class_exists( 'ACF' ) ) {
wp_deregister_script( 'yoast-seo-select2' );
wp_dequeue_script( 'yoast-seo-select2' );
wp_enqueue_script( 'yoast-seo-select2', acf_get_url( "assets/inc/select2/4/select2.full.js" ), [ 'jquery' ]);
}
}
add_action( 'admin_enqueue_scripts', 'fixYoastAndAcf', 99 );
I hope this issue fix on the next versions.
Best Regards.
Hey everyone,
Do you also have WooCommerce installed with Yoast on these installs?
In 5.10.1, we had to work around a bug in WooCommerce where they’re loading a non-select2 compatible version of SelectWoo by mistake, but calling it select2. They’ve got a patch already merged to core for their 5.7 release – but until then, I think it’s possible that Yoast + WooCommerce leaves us a case where this could happen.
Hey @lgladdy,
Yes, the WooCommerce already installed on all of them and the problem came up when these 3 plugins were activated.
In the latest version, 5.10.2 fixed this issue.
Thanks for Your consistency.
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.