You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The system allows you to save multiple messages with the same slug if they differ in the case. This causes the server to return a 500 error when trying to display the message.
In my case, one of our marketers entered "WELCOME" for one slug and used the default "welcome" for another, and "welCOME" for a third.
I believe the expected behavior is to mark the slug field as invalid and ask the user to fix the value before saving.
Here is the stack trace -
22:24:03.371 | WEB | [pid: 677\|app: 0\|req: 354/36877] 10.0.0.18 () {46 vars in 1180 bytes} [Wed Apr 10 17:24:03 2019] GET /newsletter/news/archive/2019/4/9/WELCOME/ => generated 27 bytes in 73 msecs (HTTP/1.0 500) 7 headers in 274 bytes (1 switches on core 0)
-- | -- | --
22:24:03.371 | WEB | (self.model._meta.object_name, num)
22:24:03.371 | WEB | File "/virtualenv/lib/python3.6/site-packages/django/db/models/query.py", line 384, in get
22:24:03.371 | WEB | newsletter.models.MultipleObjectsReturned: get() returned more than one Submission -- it returned 3!
22:24:03.369 | WEB | File "/virtualenv/lib/python3.6/site-packages/django/views/generic/detail.py", line 53, in get_object
22:24:03.369 | WEB | self.object = self.get_object()
22:24:03.369 | WEB | File "/virtualenv/lib/python3.6/site-packages/django/views/generic/dates.py", line 682, in get_object
22:24:03.369 | WEB | return super(BaseDetailView, self).get_object(queryset=qs)
22:24:03.369 | WEB | obj = queryset.get()
22:24:03.368 | WEB | File "/virtualenv/lib/python3.6/site-packages/newsletter/views.py", line 155, in dispatch
22:24:03.368 | WEB | File "/virtualenv/lib/python3.6/site-packages/django/views/generic/base.py", line 68, in view
22:24:03.368 | WEB | return handler(request, *args, **kwargs)
22:24:03.368 | WEB | File "/virtualenv/lib/python3.6/site-packages/django/views/generic/detail.py", line 115, in get
22:24:03.368 | WEB | return self.dispatch(request, *args, **kwargs)
22:24:03.368 | WEB | response = wrapped_callback(request, *callback_args, **callback_kwargs)
22:24:03.368 | WEB | File "/virtualenv/lib/python3.6/site-packages/django/views/generic/base.py", line 88, in dispatch
22:24:03.368 | WEB | return super(ProcessUrlDataMixin, self).dispatch(*args, **kwargs)
22:24:03.367 | WEB | File "/virtualenv/lib/python3.6/site-packages/django/core/handlers/base.py", line 187, in _get_response
22:24:03.367 | WEB | File "/virtualenv/lib/python3.6/site-packages/django/core/handlers/base.py", line 185, in _get_response
22:24:03.367 | WEB | response = self._get_response(request)
22:24:03.367 | WEB | response = self.process_exception_by_middleware(e, request)
22:24:03.365 | WEB | File "/virtualenv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 41, in inner
22:24:03.365 | WEB | response = get_response(request)
22:24:03.365 | WEB | File "/virtualenv/lib/python3.6/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
22:24:03.365 | WEB | Traceback (most recent call last):
22:24:03.365 | WEB | Internal Server Error: /newsletter/news/archive/2019/4/9/WELCOME/
The text was updated successfully, but these errors were encountered:
The system allows you to save multiple messages with the same slug if they differ in the case. This causes the server to return a 500 error when trying to display the message.
In my case, one of our marketers entered "WELCOME" for one slug and used the default "welcome" for another, and "welCOME" for a third.
I believe the expected behavior is to mark the slug field as invalid and ask the user to fix the value before saving.
Here is the stack trace -
The text was updated successfully, but these errors were encountered: