Support » Plugin: The Events Calendar » Conflict with Meta Box plugin (Select2 error)

  • On a client site I’m using:
    Meta Box 5.2.2
    MB Relationships 1.7.0
    The Events Calendar 4.9.10

    We set up post relationships using the MB Relationship extension.

    When editing an event (classic editor), the select dropdown in the relationship meta box fails to load posts (no entries). This is the error in the browser console:

    Error: Option 'ajax' is not allowed for Select2 when attached to a <select> element. 2 select2.min.js:21:18425
        prepareOpts http://localhost/wp-content/plugins/the-events-calendar/common/vendor/tribe-select2/select2.min.js:21
        each jQuery
        prepareOpts http://localhost/wp-content/plugins/the-events-calendar/common/vendor/tribe-select2/select2.min.js:21
        prepareOpts http://localhost/wp-content/plugins/the-events-calendar/common/vendor/tribe-select2/select2.min.js:22
        init http://localhost/wp-content/plugins/the-events-calendar/common/vendor/tribe-select2/select2.min.js:21
        select2 http://localhost/wp-content/plugins/the-events-calendar/common/vendor/tribe-select2/select2.min.js:22
        jQuery 2
        select2 http://localhost/wp-content/plugins/the-events-calendar/common/vendor/tribe-select2/select2.min.js:22
        transform http://localhost/wp-content/plugins/meta-box/js/select-advanced.js:92
        jQuery 8
        clone http://localhost/wp-content/plugins/meta-box/js/clone.js:154
        addClone http://localhost/wp-content/plugins/meta-box/js/clone.js:196
        jQuery 2

    I disabled all other plugins and switched to Twenty Seventeen theme. On other post edit screens (classic editor), the relationship dropdown works fine. I’ve already contacted the Meta Box authors, who informed me that they’re using Select2 4.x while TEC uses version 3.x. On pages where Select 3.x gets loaded, the dropdowns for 4.x break.

    Possible solutions I can think of on your end:

    • Upgrading Select2 to 4.x
    • Adding an option/filter to disable Select2 completely, falling back to a standard dropdown input field
  • You must be logged in to reply to this topic.