Followup: ACF Conflict with Relational Field

Home Forums Calendar Products Events Calendar PRO Followup: ACF Conflict with Relational Field

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1088763
    ejimford
    Participant

    Hello, all! I just wanted to post a quick follow up to this thread about the select2 conflict with the relational fields Advanced Custom Fields plugin.

    I just received a notification saying that the Modern Tribe crew still haven’t had a chance to implement the fix, which involves using a more up-to-date version of the select2.js library.

    BUT, there is good news! The temporary fix that was provided by George from Modern Tribe in that thread does seem have solved the problem for time being. I discovered this just over the last few days when my site managers upgraded ACF (even though I told them not to) and I decided to give it a shot.

    For reference, here’s the code that George provided. Just paste that into your functions.php file and the relational fields (with multi-select) is working again.

    if ( function_exists( 'acf_get_dir' ) ) {
     
        add_action( 'wp_enqueue_scripts', 'tribe_events_disable_select2', 999 );
        add_action( 'admin_enqueue_scripts', 'tribe_events_disable_select2', 999 );
     
        function tribe_events_disable_select2() {
        wp_dequeue_style( 'tribe-events-select2-css' );
        wp_dequeue_script( 'tribe-events-select2' );
     
            wp_enqueue_style( 'select2', acf_get_dir( 'assets/inc/select2/select2.css' ), '', 'TribeTempFix' );
            wp_enqueue_script( 'select2', acf_get_dir( 'assets/inc/select2/select2.min.js' ), array('jquery'), 'TribeTempFix', true );
        }
    }

    SO… A (somewhat reticent) “hooray” for the Modern Tribe team for getting a fix that, at least, addresses the issue in the short term. I really appreciate the help with getting it working. But PLEASE keep this on the roadmap for a maintenance release asap. ACF is an really common plugin that I use on almost every site I build. This conflict has caused me a headache-and-a-half.

    (Sidebar: I started a new thread because the original thread was automatically closed and I can’t post a reply there. If any mods want to merge them, feel free. I’m sure that would be more useful for future searchers).

    Thanks a ton for everything.

    #1088965
    Brian
    Member

    Hi,

    Thanks for the followup and glad George provided a work around.

    It is in our system as the highest priority so it is close to the top of the list and should be in the next one or the one after, but it has not been officially scheduled yet.

    It is on track to get into a maintenance release I do not have an exact timeline for when it will be included.

    Cheers

    #1095940
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Followup: ACF Conflict with Relational Field’ is closed to new replies.