Closed Bug 1039778 Opened 10 years ago Closed 10 years ago

Error submitting the privacy policy

Categories

(Mozilla QA Graveyard :: One and Done, defect, P1)

Version 2
x86
macOS
defect

Tracking

(Not tracked)

VERIFIED FIXED
Milestone 2

People

(Reporter: rbillings, Unassigned)

References

Details

Attachments

(1 file)

User with a database record who has not yet signed the privacy policy gets error when submitting the PP form- error states that checkbox is required.

1) FF31
2) log in with user who has not created their profile
3) check the checkbox, click submit

expected: user profile created
actual: error: field is required over checkbox, unable to submit
Intermittent pass/failures on FF30, FF31, Chrome, Safari

Often able to repro after removing the PP checkbox setting via the admin
I think the steps to repro are this:

1. Via the admin, set a user so they have not signed the PP
2. Log in as that user
3. You should see the profile page, and the PP checkbox should already be checked
4. Try submitting that form as is.

I believe that will repro the problem.
This is a P1 bug so if one (or even both) of you can review this and do some local testing to make sure it doesn't break anything else, ASAP, that would be appreciated.
Attachment #8457634 - Flags: review?(mozpankaj1994)
Attachment #8457634 - Flags: review?(mjzffr)
Comment on attachment 8457634 [details] [review]
Link to Github pull-request: https://github.com/mozilla/oneanddone/pull/161

I tested this locally I could repro the bug and verify that it works fine after applying the patch, but its strange and makes me curious to know that if it was working fine in the initial version then how was the error introduced and also how could just renaming a variable make this work ?
Attachment #8457634 - Flags: review?(mozpankaj1994) → review+
Thanks for the review, bitgeeky.

It's a bit hard to explain, and I don't fully understand exactly what caused the problem, but what it came down to was that the checkbox field that was being generated on the form had a `value="0"` in it, which meant that, when the form was submitted, the value of `privacy_policy_accepted` was being set to 0, which is the opposite of what we want if the checkbox is checked.

It seemed like we didn't really want the checkbox field to be bound to the database `privacy_policy_accepted` field (which _did_ have a value of 0). All we really needed was a checkbox field which must be checked to continue, and then, when the form is submitted, we can just set `privacy_policy_accepted` to `True`.

I made that change and it worked. I have a feeling this bug may have been around for some time and just wasn't reported.

I'm not sure if that fully explains what was going on, but hopefully it explains why the solution makes sense.
This fix has been pushed to staging.

Rebecca, can you verify it when you get a chance so I can also push it to prod?
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: needinfo?(rbillings)
Resolution: --- → FIXED
Blocks: 1032881
I verified this on staging with Chrome, FF30, Safari - I was no longer getting the error with the same steps I used on production.
Status: RESOLVED → VERIFIED
Flags: needinfo?(rbillings)
OK, I'm going to push the fix to prod.
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: