ValidationError: ManagementForm data is missing or has been tampered with

5,116 views
Skip to first unread message

Knut Ivar Nesheim

unread,
Feb 5, 2010, 10:54:59 AM2/5/10
to django...@googlegroups.com
Hello fellow Django users,

From time to time users of one of my applications has problems with
formsets. More specifically:

...my stuff...
File "/usr/lib/python2.4/site-packages/django/forms/models.py", line
399, in __init__
super(BaseModelFormSet, self).__init__(**defaults)

File "/usr/lib/python2.4/site-packages/django/forms/formsets.py",
line 47, in __init__
self._construct_forms()

File "/usr/lib/python2.4/site-packages/django/forms/formsets.py",
line 91, in _construct_forms
for i in xrange(self.total_form_count()):

File "/usr/lib/python2.4/site-packages/django/forms/formsets.py",
line 70, in total_form_count
return self.management_form.cleaned_data[TOTAL_FORM_COUNT]

File "/usr/lib/python2.4/site-packages/django/forms/formsets.py",
line 57, 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']

This only happens for Internet Explorer 6, 7 and 8 users. When looking
at the source of the page, all the correct fields are there(even in
the browsers mentioned). When I check request.POST I find all the
fields from the management form(total forms, initial forms and max num
forms). The only difference I can see from the error in the production
environment is that max num forms is missing from request.POST, could
this be causing the error?

Kind regards,
Knut Nesheim

DrMeers

unread,
Feb 22, 2010, 11:40:05 PM2/22/10
to Django users
I have the same problem -- only intermittently, only IE, can't put my
finger on what is causing it. A couple of times a month I get an
emailed error message coming through. I have not been able to
replicate it on my machine, even using IE and performing the same
operation; very odd.

Gramware

unread,
Apr 10, 2010, 5:55:16 PM4/10/10
to Django users

Dane Kennedy

unread,
May 24, 2018, 8:08:35 AM5/24/18
to Django users
I'm getting the same thing, except it's 2018 >:/. I'm waiting to hear from users if they're using IE, but do you think there's any chance this is still a problem?
Reply all
Reply to author
Forward
0 new messages