Latest Updates have broken WooCommerce product input

Home Forums Calendar Products Events Calendar PRO Latest Updates have broken WooCommerce product input

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1568630
    mtnhops
    Participant

    Product edit screens are frozen in WooCommerce after latest updates. It seems to not load completely and to act like every product is an external product. Nothing can be accessed using product data meta boxes, including attributes, variables, etc.

    Here is the error I get on the product edit screen:

    Uncaught Error: Option 'ajax' is not allowed for Select2 when attached to a <select> element.
        at String.<anonymous> (select2.min.js?ver=4.7.15:21)
        at Function.each (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,jquery-ui-core,utils,jquery-ui-widget,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-position,jquery-u&load[]=i-sortable,underscore,backbone,wp-util,wp-backbone,media-models,moxiejs,plupload&ver=4.9.7:2)
        at i.prepareOpts (select2.min.js?ver=4.7.15:21)
        at i.prepareOpts (select2.min.js?ver=4.7.15:22)
        at init (select2.min.js?ver=4.7.15:21)
        at HTMLSelectElement.<anonymous> (select2.min.js?ver=4.7.15:22)
        at Function.each (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,jquery-ui-core,utils,jquery-ui-widget,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-position,jquery-u&load[]=i-sortable,underscore,backbone,wp-util,wp-backbone,media-models,moxiejs,plupload&ver=4.9.7:2)
        at a.fn.init.each (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,jquery-ui-core,utils,jquery-ui-widget,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-position,jquery-u&load[]=i-sortable,underscore,backbone,wp-util,wp-backbone,media-models,moxiejs,plupload&ver=4.9.7:2)
        at a.fn.init.e.fn.select2 (select2.min.js?ver=4.7.15:22)
        at Object.d.initializeEnhancedSelect (wc-memberships-enhanced-select.min.js?ver=1.10.5:1)

    The select2 references all originate in event tickets plugin. When I disable that plugin, I get the same set of errors, but then the select2 references show in the events calendar plugin.

    Currently trying to revert to an older version to see if that helps.

    #1569212
    mtnhops
    Participant

    Hello, just checking in on this. I tried reverting to a previous version of all four plugins (the events calendar, events calendar pro, event tickets, event tickets plus) on a staging version of the site and got a fatal error. Please advise on whether you are aware of this problem and/or whether there is a version I can revert to in order to temporarily allow product editing in WooCommerce.

    #1569380
    Sky
    Keymaster

    Hi there,

    I’m sorry to hear that you’re experiencing this issue. I will try to help you get this sorted.

    We are aware of this issue. It is a conflict with the version of the Select2 js library that our plugins use. It seems that a recent update to the Woo Membership plugin has triggered some problems.

    You might try reverting to an earlier version of that plugin if possible. Otherwise, I can provide a method of dequeueing the version that our plugin uses.

    You can add the following to your child theme functions.php or a functionality plugin:

    wp_deregister_script( 'tribe-select2' );

    Doing so may affect the plugin functionality of the events interface, but it will hopefully still be useable.

    I’m going to attach this thread to the bug ticket, and if and when we can provide a fix, someone will follow back up with you here to let you know.

    Please let me know if you have any other questions in the meantime.

    Thanks,
    Sky

    #1572346
    David Golden
    Participant

    Is there any update on this one? I’ve tried a few different methods and this script continues to load on my site.

    Both your dequeue extension and the following code, failed to deregister the script. I’ve tried both a lower and higher priority without any change.

    add_action( ‘wp_enqueue_scripts’, ‘en_remove_tribe_select2’, 20 );
    function en_remove_tribe_select2() {
    wp_deregister_script( ‘tribe-select2’ );
    }

    #1572675
    Sky
    Keymaster

    Hi again,

    I have tracked down some updated code for this.


    function tribe_select2_conflict_fix() {
    $admin_helpers = Tribe__Admin__Helpers::instance();
    if ( ! $admin_helpers->is_screen() ) {
    wp_deregister_script( 'tribe-select2' );
    }
    }
    add_action( 'admin_enqueue_scripts', 'tribe_select2_conflict_fix', 11);

    This should disable our select2 function when not in event admin screens.

    Let me know if that works for you.

    Thanks,
    Sky

    #1572944
    mtnhops
    Participant

    Thanks, I’ve replaced the global wp_deregister_script function with this more specific one and we can now edit products.

    #1573597
    Sky
    Keymaster

    Great! I’m glad that worked for you.

    You will need to keep that fix in place for the time being. All of our plugins are built with the older syntax, and changing everything is going to be quite a project. I’m not sure when it will be able to be updated on our end.

    Please let us know if you have any issues or questions in the future.

    Thanks,
    Sky

    #1574007
    Victor
    Member

    Hi There!

    Just wanted to share with you that a new release of Events Calendar PRO is out, including a fix for this issue 🙂

    Find out more about this release → https://theeventscalendar.com/announcing-events-calendar-pro-4-4-29-2/

    We apologize for the delay and appreciate your patience while we worked on this.

    Please update the plugins and see if the fix works for your site. Don’t hesitate to open a new topic if anything comes up.

    Best,
    Victor

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Latest Updates have broken WooCommerce product input’ is closed to new replies.