• Resolved stevygee1987

    (@stevygee1987)


    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 https://localhost/wp-content/plugins/the-events-calendar/common/vendor/tribe-select2/select2.min.js:21
        each jQuery
        prepareOpts https://localhost/wp-content/plugins/the-events-calendar/common/vendor/tribe-select2/select2.min.js:21
        prepareOpts https://localhost/wp-content/plugins/the-events-calendar/common/vendor/tribe-select2/select2.min.js:22
        init https://localhost/wp-content/plugins/the-events-calendar/common/vendor/tribe-select2/select2.min.js:21
        select2 https://localhost/wp-content/plugins/the-events-calendar/common/vendor/tribe-select2/select2.min.js:22
        jQuery 2
        select2 https://localhost/wp-content/plugins/the-events-calendar/common/vendor/tribe-select2/select2.min.js:22
        transform https://localhost/wp-content/plugins/meta-box/js/select-advanced.js:92
        jQuery 8
        clone https://localhost/wp-content/plugins/meta-box/js/clone.js:154
        addClone https://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
  • The topic ‘Conflict with Meta Box plugin (Select2 error)’ is closed to new replies.