ngageoint / geoevents

The GeoEvents project is a dynamic and customizable open source web presence that provides a common operational picture to consolidate activities, manage content, and provides a single point of discovery. GeoEvents was used by deployers and first responders in over 100 real-world events.
MIT License
41 stars 12 forks source link

POST to /admin/director/programinfo/add errors out #7

Open nstarke opened 9 years ago

nstarke commented 9 years ago

On page /admin/director/programobservation/add/, there is a green "+" button next to the "program" select list. Clicking that button brings up a popup window. In that window, when I enter 'test' as the value for all required fields and POST the form, the application errors out with a 500 HTTP response code.

Traceback is as follows:

Environment:

Request Method: POST
Request URL: [REDACTED]/admin/director/programinfo/add/?_popup=1

Django Version: 1.5.4
Python Version: 2.7.6
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.admin',
 'django.contrib.admindocs',
 'django.contrib.gis',
 'django.contrib.markup',
 'geoevents.maps',
 'geoevents.operations',
 'geoevents.notes',
 'geoevents.feedback',
 'geoevents.taggit',
 'geoevents.core',
 'geoevents.heartbeat',
 'geoevents.director',
 'tinymce',
 'geoevents.timeline',
 'south',
 'compressor',
 'geoevents.classification',
 'filer')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.auth.middleware.RemoteUserMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'geoevents.core.middleware.OpenSSO')

Traceback:
File "/home/nick/geoevents/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  115.                         response = callback(request, *callback_args, **callback_kwargs)
File "/home/nick/geoevents/local/lib/python2.7/site-packages/django/contrib/admin/options.py" in wrapper
  372.                 return self.admin_site.admin_view(view)(*args, **kwargs)
File "/home/nick/geoevents/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  91.                     response = view_func(request, *args, **kwargs)
File "/home/nick/geoevents/local/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  89.         response = view_func(request, *args, **kwargs)
File "/home/nick/geoevents/local/lib/python2.7/site-packages/django/contrib/admin/sites.py" in inner
  202.             return view(request, *args, **kwargs)
File "/home/nick/geoevents/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapper
  25.             return bound_func(*args, **kwargs)
File "/home/nick/geoevents/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  91.                     response = view_func(request, *args, **kwargs)
File "/home/nick/geoevents/local/lib/python2.7/site-packages/django/utils/decorators.py" in bound_func
  21.                 return func(self, *args2, **kwargs2)
File "/home/nick/geoevents/local/lib/python2.7/site-packages/django/db/transaction.py" in inner
  223.                 return func(*args, **kwargs)
File "/home/nick/geoevents/local/lib/python2.7/site-packages/django/contrib/admin/options.py" in add_view
  1010.                 return self.response_add(request, new_object)
File "/home/nick/geoevents/local/lib/python2.7/site-packages/django/contrib/admin/options.py" in response_add
  833.                 (escape(pk_value), escapejs(obj)))
File "/home/nick/geoevents/local/lib/python2.7/site-packages/django/utils/functional.py" in wrapper
  196.             return func(*args, **kwargs)
File "/home/nick/geoevents/local/lib/python2.7/site-packages/django/utils/html.py" in escapejs
  64.     return mark_safe(force_text(value).translate(_js_escapes))

Exception Type: TypeError at /admin/director/programinfo/add/
Exception Value: expected a character buffer object
nstarke commented 9 years ago

Interestingly enough, I do not have any problems saving when I navigate to "add program info" from the admin menu (as opposed to the popup). The pop up has a URL query string value of "?_popup=1". I don't see any other differences in how the form is submitted between the two. I believe that has something to do with the underlying problem.