django-autocomplete-light: Cannot read property 'define' of undefined at dalLoadLanguage
Trying to use DAL for formsets in Django 3.1.2.
Problem described occurs in 3.8.1, 3.8.0, 3.7.0dev0 installed via pip
.
Does not occur in 3.6.0dev1 and earlier (tried through 3.5.1)
Does not occur in the sample project (which installs via git)
Set up autocomplete views and form widgets per documentation tutorial. Included {{form.media}}
on page as instructed. Upon page load, select widgets are not populated (just single -----------
).
Cannot diagnose further as error is thrown in console:
en.js:2 Uncaught TypeError: Cannot read property 'define' of undefined
at dalLoadLanguage (en.js:2)
at autocomplete_light.js:106
at autocomplete_light.js:217
Both Chrome and Firefox highlight that n is undefined at the n.define call at the start of en.js
:
var dalLoadLanguage=function(e){var n;e&&e.fn&&e.fn.select2&&e.fn.select2.amd&&(n=e.fn.select2.amd),n.define("select2/i18n/en",[],function() ...
Not sure where to begin trying to resolve.
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 9
- Comments: 18 (4 by maintainers)
Commits related to this issue
- Revert dal version due to bug https://github.com/yourlabs/django-autocomplete-light/issues/1195 — committed to icann/lgr-django by j-bernard 3 years ago
- Revert dal version due to bug https://github.com/yourlabs/django-autocomplete-light/issues/1195 — committed to icann/lgr-django by j-bernard 3 years ago
- Revert dal version due to bug https://github.com/yourlabs/django-autocomplete-light/issues/1195 — committed to icann/lgr-django by j-bernard 3 years ago
- Revert dal version due to bug https://github.com/yourlabs/django-autocomplete-light/issues/1195 — committed to icann/lgr-django by j-bernard 3 years ago
I had the same issue with V3.8.1 as well, “fix” was to downgrade DAL to 3.5.1…