-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught TypeError: Cannot read property 'autocomplete' of undefined #218
Comments
I think I'm running into the same error, but only in the Django Admin. Everything works fine on Django 1.11, but when I upgrade to 2.2, I start getting the error you've noted in the console, and autocomplete doesn't function. Also, as you noted, jQuery and jQueryUI assets are loaded, and a The only change between Django 1.11 and Django 2.2 is that the admin is now using jQuery 3.5.1 instead of jQuery 2.2.3. I can workaround the problem by manually loading all the of the assets like the last example in this section of the docs:
That doesn't get rid of the JS console error (which occurs when the form widget's media tries to load), but the autocomplete starts working again. |
@vkurup Thank you for taking the time and trouble to look at this. In the meantime I have decided to switch to another autocomplete widget that seems to work without any problems. |
Thanks @vkurup ; this works in 2021 using django 3.2 as well. Moving forward; will migrate to a new autocomplete library - do you have any recommendations that are a drop-in replacement for django-selectable? |
I am in the process of upgrading an older Django project to Django 1.11 (prior to a move to version 2). I have installed django-selectable 1.3.0 but now the auto-complete no longer works. I have not changed any of the code in Django itself; this appears to be a JavaScript error BUT I am not a JavaScript programmer and cannot see how to solve this?
Notes below refer to the developer tools console in Chrome.
The Console tab reports:
The Network tab shows that jQuery-UI 1.11.4 and jQuery 1.12.4 are being loaded.
The Sources tab highlights line 17:
And hovering over the error shows the popup message "Uncaught TypeError: Cannot read property 'autocomplete' of undefined."
The text was updated successfully, but these errors were encountered: