alexis-magina / cmb2-field-post-search-ajax

CMB2 field type to attach posts to each others.
GNU General Public License v3.0
40 stars 18 forks source link

Uncaught TypeError: $(...).autocomplete is not a function #14

Closed sebask closed 7 years ago

sebask commented 7 years ago

Using the latest version (1.1.3) I get the following error:

Uncaught TypeError: $(...).autocomplete is not a function
    at HTMLInputElement.<anonymous> (mag-post-search-ajax.js?ver=1.1.3:10)
    at Function.each (jquery.js?ver=1.12.4:2)
    at a.fn.init.each (jquery.js?ver=1.12.4:2)
    at HTMLDocument.<anonymous> (mag-post-search-ajax.js?ver=1.1.3:4)
    at i (jquery.js?ver=1.12.4:2)
    at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2)
    at Function.ready (jquery.js?ver=1.12.4:2)
    at HTMLDocument.K (jquery.js?ver=1.12.4:2)
sebask commented 7 years ago

It seems this was caused due to conflicts between jquery-ui-autocomplete and devbridge/jQuery-Autocomplete. Switching to usage of devbridgeAutocomplete (as suggested https://github.com/devbridge/jQuery-Autocomplete#known-issues) solves this.

Created a PR for it #16.