Plugin conflict select_locale Event Calendar & Advanced Custom Fields Pro

Home Forums Ticket Products Event Tickets Plus Plugin conflict select_locale Event Calendar & Advanced Custom Fields Pro

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1071799
    dimitrilongo
    Participant

    Hello

    I have a plugin conflict with Event Calendar with ticket Plus and Advanced Custom Field Pro, i test with many plugins it appears only with EVENT & ACF
    Getting the following JS error:

    TypeError: Attempted to assign to readonly property.
    /wp-content/plugins/advanced-custom-fields-pro/assets/inc/select2/select2_locale_fr.js?ver=3.5.2 line 9

    the code from ACF :

    // vars
    $lang = str_replace('_', '-', $lang);
    $lang_code = substr($lang, 0, 2);
    $src = '';

    // attempt 1
    if( file_exists(acf_get_path("assets/inc/select2/select2_locale_{$lang_code}.js")) ) {

    $src = acf_get_dir("assets/inc/select2/select2_locale_{$lang_code}.js");

    } elseif( file_exists(acf_get_path("assets/inc/select2/select2_locale_{$lang}.js")) ) {

    $src = acf_get_dir("assets/inc/select2/select2_locale_{$lang}.js");

    }

    // bail early if no language
    if( !$src ) return;

    // scripts
    wp_enqueue_script('select2-l10n', $src, '', $version, true );

    I open also a ticket with ACF

    Maybe you have an idea what cause the conflict with select2 ACF et EVENT

    Regards

    #1072176
    Geoff
    Member

    Hi @dimitrilongo,

    Sorry for the trouble here!

    My hunch is that both plugins are calling the same select2 library from two different sources and those two calls are conflicts with one another. The Events Calendar uses select2 across most of the plugin so it’s definitely necessary, but I wonder if you could try dequeuing ACF’s version when events are present.

    The calendar’s copy of the script is located here:
    /the-events-calendar/vendor/select2/select2.min.js

    And it’s corresponding handle is ‘select2’.

    Sorry again for the conflict here, but I hope this at least helps get a resolution started so both plugins work smoothly together.

    Thanks,
    Geoff

    #1079587
    dimitrilongo
    Participant

    Hello Modern Tribe,

    i’have some info about the conflict, Elliot the main dev of ACF, kindly made some debugging, here’s the answer of what he founds, Hope it can helps
    “I’ve been doing some debugging and have some useful info for you.

    The Events Calendar plugin is including an older version of Select2 which does not support translations.
    ACF is including a newer version which does.

    In theory, ACF will not include the select2 translation file unless it is including select2.
    The problem is that the Events Calendar plugin is registering Select2 with a prefix in the script name.
    Instead of being ‘select2’, it is ‘tribe-events-select2’.

    Now than multiple plugins are including Select2, it is important that we all call it ‘select2’ so we can avoid including multiple instances of it.

    Can you please contact the Event Calendar devs with this info?”

    Regards
    Dimitri

    • This reply was modified 10 years, 2 months ago by dimitrilongo.
    #1079713
    Geoff
    Member

    Hey Dimitri,

    Thanks so much for this info! That makes a lot of sense–I went ahead and opened a ticket for us to fix this. Although I don’t have a timeframe for when it will be released, I have linked this thread to the ticket and I will be sure to follow-up with you when there’s more to share.

    I appreciate you bringing this to our attention so we can clear it up!

    Geoff

    #1086252
    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.

    #1088727
    Leah
    Member

    Hello,

    Thank you for reporting this issue. We weren’t able to get a fix for it into our upcoming release (4.1). However, please know that the problem is still on our radar and is ticketed within our system to be addressed in a future maintenance release. We’ll do our best to keep you posted when we are able to get a solution in place. Thank you for your patience while we improve and expand our plugins.

    Best,
    Leah

    #1186702
    George
    Participant

    Hello!

    I wanted to post a quick note here that we have published a new Maintenance Release today that should address some of the problems reported in this thread.

    You can read about the details of this release here → https://theeventscalendar.com/maintenance-release-events-calendar-4-3-2-event-tickets-4-3-2-premium-plugins/

    I hope this update helps!

    If issues persist, open a new thread in the forums and be sure to include your site’s complete, un-edited “System Information” as per the instructions in this knowledgebase guide.

    Cheers,
    George

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Plugin conflict select_locale Event Calendar & Advanced Custom Fields Pro’ is closed to new replies.