Support

Account

Home Forums Backend Issues (wp-admin) ACF & Yoast Seo Conflict Issue

Solved

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.

  • I just try it , it worked well .

    thank you

  • 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.

  • @lgladdy

    In the latest version, 5.10.2 fixed this issue.

    Thanks for Your consistency.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.