I am using django-debug-toolbar(latest version, v1.2.1) and I keep getting this error in the console:
Empty string passed to getElementById()
For this piece of code in jQuery (line 2757):
...
// HANDLE: $(
} else {
elem = document.getElementById( match[2] );
...
Each link on the debug toolbar that I click causes a different warning to appear.
When I comment on my main jQuery source file, the debug toolbar works. Also, it works fine in the Django admin, apparently because the Django admin uses a different jQuery fetch method.
I tried @Carlton Gibson's answer, but this does not solve my problem. I also tried local jQuery from both CDN and several different versions to no avail ...
jQuery , django-debug-toolbar. , , .
, , , , . . , RequireJS django-debug-toolbar:
GET http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js [HTTP/1.1 304 Not Modified 133ms]
ReferenceError: jQuery is not defined localhost:8000:119
TypeError: djdt is undefined toolbar.js:297
Empty string passed to getElementById()
, jQuery , django-debug-toolbar ( DEBUG_TOOLBAR_CONFIG = { 'JQUERY_URL': '', }), , DjDT . - TypeError.
base.html, JS. , , .
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js" defer></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js" defer></script>
, , . , , , , . , id, script class, . , DjDT .
. , id, , a. class, . , , . !