Advanced Custom Fields Conflict

Home Forums Calendar Products Events Calendar PRO Advanced Custom Fields Conflict

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1416366
    spencerfcloud
    Participant

    Hi Modern Tribe,

    Since around November of last year, there has been a conflict with Advanced Custom Fields Pro and The Events Calendar plugins. I use Events Calendar, Event Tickets, and Event Tickets Plus on my site, but can’t update them past 4.6.3, 4.5.7, and 4.5.6 respectively.

    When these are updated, if you try to edit or create an event with Advanced Custom Fields Pro activated, nothing JavaScript works on the page. Clicking the arrows to expand/collapse groups of content on the page does not work. Screen Options does not work. Hovering over the left menu items on the WP Admin Panel doesn’t work either.

    I have seen that there was supposedly a patch released in November to fix this issue, but there were no confirmations that it worked for anyone, and it hasn’t worked for me either, so I am creating this post. Please let me know if there is going to be another patch sometime soon, or if there is anything I am doing wrong.

    Thanks

    #1416539
    Brendan
    Keymaster

    Hi Spencer,

    Thanks for the email and sorry you are experiencing issues. Can you also try testing for conflicts with your theme and other plugins? If you would prefer not to do this on your live site, WP Staging will let you create a quick copy of your live site that you can use for testing. Let me know what you find!

    Thanks,
    Brendan

    #1426631
    spencerfcloud
    Participant

    Hey Brendan. Thanks for your patience on this. I had time to do some testing on my local environment and found the issue. There was some code in functions.php that was causing the issue when Event Ticket Plus was activated:

    `
    function tribe_etp_move_tickets_purchase_form ( $ticket_location_action, $ticket_location_priority = 10 ) {
    $etp_classes = array(
    ‘Tribe__Tickets_Plus__Commerce__EDD__Main’,
    // ‘Tribe__Tickets_Plus__Commerce__Shopp__Main’, // As of ETP v4.0 Shopp will generate errors when referenced, if not active. Uncomment this line if you have Shopp Active
    ‘Tribe__Tickets_Plus__Commerce__WPEC__Main’,
    ‘Tribe__Tickets_Plus__Commerce__WooCommerce__Main’
    );

    foreach ( $etp_classes as $ticket_class ) {
        if ( ! class_exists( $ticket_class ) ) break;
    
        $form_display_function = array( $ticket_class::get_instance(), 'front_end_tickets_form' );
    
        if ( has_action ( 'tribe_events_single_event_after_the_meta', $form_display_function ) ) {
            remove_action( 'tribe_events_single_event_after_the_meta', $form_display_function, 5 );
            add_action( $ticket_location_action, $form_display_function, $ticket_location_priority );
        }
    }
    

    }

    /*
    * TO MOVE THE TICKET FORM UNCOMMENT ONE OF THE FOLLOWING
    */

    /*
    * Uncomment to Move Ticket Form Below Related Events
    */
    //tribe_etp_move_tickets_purchase_form( ‘tribe_events_single_event_after_the_meta’, 20 );

    /*
    * Uncomment to Move Ticket Form Below the Event Description
    */
    //tribe_etp_move_tickets_purchase_form( ‘tribe_events_single_event_after_the_content’, 5 );

    /*
    * Uncomment to Move Ticket Form Above the Event Description
    */
    tribe_etp_move_tickets_purchase_form( ‘tribe_events_single_event_before_the_content’ );
    `

    I’m not sure when this was added, but it must have been for a previous version of Event Tickets Plus / Events Calendar. I tested the site without the code and it didn’t seem to be doing anything as far as form placement goes (or anything else besides the admin bug), so I removed it and the bug went away. Thanks!

    • This reply was modified 8 years, 4 months ago by spencerfcloud.
    #1428197
    Brendan
    Keymaster

    Hi Spencer,

    Nice find and thank you for posting the solution!

    Let us know if there is anything else we can do for you.

    Thanks,
    Brendan

    #1446452
    Support Droid
    Keymaster

    Hey 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

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Advanced Custom Fields Conflict’ is closed to new replies.