[prod] 500 thrown when saving groups with unvouched members

VERIFIED FIXED

Status

Participation Infrastructure
Phonebook
P1
critical
VERIFIED FIXED
4 years ago
4 years ago

People

(Reporter: hoosteeno, Assigned: dpoirier)

Tracking

2014-02.2
Dependency tree / graph

Details

(Whiteboard: [kb=1268967] [dev][stage][prod])

Steps to replicate:

1. Edit a group (in staging or dev). For example, https://mozillians.allizom.org/admin/groups/group/12022/
2. Choose the "Functional Area" flag
3. Save

Expected behavior: 
Either the group saves, or form validation identifies required fields

Actual behavior:
500 error, "We're sorry something went wrong"
Duplicate of this bug: 969527
This error occurs when saving existing functional areas, too. Or when trying to remove the functional area flag from a group that has it set.
Summary: 500 thrown when saving a group as a functional area → 500 thrown when saving functional areas
Blocks: 969531
Additional debugging information:

Groups that display the problem described in bug 969063 (no members shown) are subject to this bug. Here is a group with 1 member that displays no members, and cannot be saved:

https://mozillians-dev.allizom.org/admin/groups/group/11096/

Groups that do not display that problem are not subject to this bug. Here is a group with 1 member that displays 1 member, and can be saved: 

https://mozillians-dev.allizom.org/admin/groups/group/11757/

Another way to describe this: Groups whose member count is identical to their vouched member count can be saved. See the rightmost columns here:

https://mozillians-dev.allizom.org/admin/groups/group/?o=11.10.-2.1
See Also: → bug 969063
Summary: 500 thrown when saving functional areas → 500 thrown when saving groups with unvouched members
Duplicate of this bug: 969638
This happens in dev, stage and prod. It is not limited to functional areas. Any group with unvouched members cannot be edited in /admin.
Assignee: nobody → dpoirier
Status: NEW → ASSIGNED
Severity: normal → critical
Priority: -- → P1
Traceback (most recent call last):

  File "/data/www/mozillians.org/mozillians/vendor/lib/python/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/usr/lib64/python2.6/site-packages/newrelic-1.10.2.38/newrelic/api/object_wrapper.py", line 220, in __call__
    self._nr_instance, args, kwargs)

  File "/usr/lib64/python2.6/site-packages/newrelic-1.10.2.38/newrelic/hooks/framework_django.py", line 475, in wrapper
    return wrapped(*args, **kwargs)

  File "/data/www/mozillians.org/mozillians/vendor/lib/python/django/contrib/admin/options.py", line 366, in wrapper
    return self.admin_site.admin_view(view)(*args, **kwargs)

  File "/data/www/mozillians.org/mozillians/vendor/lib/python/django/utils/decorators.py", line 91, in _wrapped_view
    response = view_func(request, *args, **kwargs)

  File "/data/www/mozillians.org/mozillians/vendor/lib/python/django/views/decorators/cache.py", line 89, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)

  File "/data/www/mozillians.org/mozillians/vendor/lib/python/django/contrib/admin/sites.py", line 196, in inner
    return view(request, *args, **kwargs)

  File "/data/www/mozillians.org/mozillians/vendor/lib/python/django/utils/decorators.py", line 25, in _wrapper
    return bound_func(*args, **kwargs)

  File "/data/www/mozillians.org/mozillians/vendor/lib/python/django/utils/decorators.py", line 91, in _wrapped_view
    response = view_func(request, *args, **kwargs)

  File "/data/www/mozillians.org/mozillians/vendor/lib/python/django/utils/decorators.py", line 21, in bound_func
    return func(self, *args2, **kwargs2)

  File "/data/www/mozillians.org/mozillians/vendor/lib/python/django/db/transaction.py", line 224, in inner
    return func(*args, **kwargs)

  File "/data/www/mozillians.org/mozillians/vendor/lib/python/django/contrib/admin/options.py", line 1049, in change_view
    queryset=inline.queryset(request))

  File "/data/www/mozillians.org/mozillians/vendor/lib/python/django/forms/models.py", line 697, in __init__
    queryset=qs, **kwargs)

  File "/data/www/mozillians.org/mozillians/vendor/lib/python/django/forms/models.py", line 424, in __init__
    super(BaseModelFormSet, self).__init__(**defaults)

  File "/data/www/mozillians.org/mozillians/vendor/lib/python/django/forms/formsets.py", line 53, in __init__
    self._construct_forms()

  File "/data/www/mozillians.org/mozillians/vendor/lib/python/django/forms/formsets.py", line 117, in _construct_forms
    for i in xrange(min(self.total_form_count(), self.absolute_max)):

  File "/data/www/mozillians.org/mozillians/vendor/lib/python/django/forms/formsets.py", line 91, in total_form_count
    return self.management_form.cleaned_data[TOTAL_FORM_COUNT]

  File "/data/www/mozillians.org/mozillians/vendor/lib/python/django/forms/formsets.py", line 78, in _management_form
    raise ValidationError('ManagementForm data is missing or has been tampered with')

ValidationError: [u'ManagementForm data is missing or has been tampered with']

Updated

4 years ago
Summary: 500 thrown when saving groups with unvouched members → [prod] 500 thrown when saving groups with unvouched members
Blocks: 969621

Updated

4 years ago
Whiteboard: [dev][stage][prod]
(Assignee)

Comment 7

4 years ago
Pull request for this and 969063: https://github.com/mozilla/mozillians/pull/804

Updated

4 years ago
Version: other → next
The PR in comment 7 has been merged as seen in 969063 comment 4. Marking this as resolved.
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Adding some administrative bugs that are currently blocked. Once this is pushed to production, I'll process the administrative requests. It is not urgent.

Thanks for the PR, Dan!
Blocks: 969890, 969803, 969771
Blocks: 970473
Verified fixed on stage. Thanks Dan!
Status: RESOLVED → VERIFIED
Whiteboard: [dev][stage][prod] → [kb=1268967] [dev][stage][prod]
Version: next → 2014-02.2
You need to log in before you can comment on or make changes to this bug.