• I’m getting an error in the admin when using select fields built with Advanced Custom Fields. Disabling WP Notification Bars make the error go away and I can then edit the Advanced Custom Fields.

    select2.full.min.js:21 Uncaught Error: Option 'multiple' is not allowed for Select2 when attached to a <select> element.
        at String.<anonymous> (/wp-content/plugins/wp-notification-bars/admin/js/select2.full.min.js:21)
        at Function.each (load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,jquery-ui-core,utils,underscore&ver=5.3.2:2)
        at d.prepareOpts (/wp-content/plugins/wp-notification-bars/admin/js/select2.full.min.js:21)
        at d.prepareOpts (/wp-content/plugins/wp-notification-bars/admin/js/select2.full.min.js:22)
        at d.init (/wp-content/plugins/wp-notification-bars/admin/js/select2.full.min.js:21)
        at HTMLSelectElement.<anonymous> (/wp-content/plugins/wp-notification-bars/admin/js/select2.full.min.js:22)
        at Function.each (load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,jquery-ui-core,utils,underscore&ver=5.3.2:2)
        at a.fn.init.each (load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,jquery-ui-core,utils,underscore&ver=5.3.2:2)
        at a.fn.init.a.fn.select2 (/wp-content/plugins/wp-notification-bars/admin/js/select2.full.min.js:22)
        at n.initialize (acf-input.min.js:4)
Viewing 1 replies (of 1 total)
  • Add this to your functions.php

    /* Disable WP Notifications plugin from firing in the admin */
    function my_mtsnb_force_bar_post_types() {
      if( is_admin() ) {
        return array();
      }
      return array( 'post', 'page' );
    }
    add_filter( 'mtsnb_force_bar_post_types', 'my_mtsnb_force_bar_post_types', 10, 3 );
    • This reply was modified 4 years, 6 months ago by ryandiaz.
Viewing 1 replies (of 1 total)
  • The topic ‘Error with Select2 when Advanced Custom Fields Select is Used’ is closed to new replies.