#32659: Autocomplete field: The results could not be loaded.
-------------------------------+--------------------------------------
     Reporter:  honyczek       |                    Owner:  nobody
         Type:  Bug            |                   Status:  closed
    Component:  contrib.admin  |                  Version:  3.2
     Severity:  Normal         |               Resolution:  needsinfo
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------

Comment (by Orangensaft):

 I was running into the exact same issue after updating from 3.1 to 3.2.
 Basically when filling in data into the select2 inputs, the query made was
 incomplete. Only the `term` param was set. The caused the
 `process_request` method in `django.contrib.admin.views.autocomplete` to
 raise an `PermissionDenied` exception. Here is the part that i mean:

 {{{
         term = request.GET.get('term', '')
         try:
             app_label = request.GET['app_label']
             model_name = request.GET['model_name']
             field_name = request.GET['field_name']
         except KeyError as e:
             raise PermissionDenied from e
 }}}

 Maybe there should be a different exception raised here for clarity.

 **To fix the issue** I just ran the `collectstatic` command and the
 problems were gone. So most likely this is caused by an old and
 incompatible js library still in the static files.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32659#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.d90ef9f835cf9b5f4c94fa53cec4996b%40djangoproject.com.

Reply via email to