mysociety / fixmystreet

This is mySociety's popular map-based reporting platform: easy to install in new countries and regions
http://fixmystreet.org/
Other
504 stars 235 forks source link

Incorrect password when signing in when making a report returns to start of process with no immediate error #4818

Open davea opened 7 months ago

davea commented 7 months ago

Describe the bug When making a new report, if the user enters an incorrect password in the "Tell us about you" section and hits "submit" they're taken back to the category selection screen with no visible error message. Clicking back through the form does reveal an error when the user reaches the "Tell us about you" page again.

To Reproduce Steps to reproduce the behavior:

  1. If signed in, sign out.
  2. Start a new report, and continue through to the "Tell us about you" page.
  3. Select "Or sign in with password to prefill this information." image
  4. Enter a valid email address and invalid password, hit submit. image
  5. User is taken back to category selection page: image
    1. Continue through the reporting form to the "Tell us about you" page and see the error: image
dracos commented 7 months ago

Looks like in 1412ead5e57 I put in fixmystreet.js the comment "// XXX Is this still needed, should it be better done server side? Will need to spot multiple pages too" before the code that shows/hides the right user bit of the form. Which I guess is what is the case here! So yes, either the server submission needs to know it's outputting this area and adjust what 'page' is initially shown/hidden in the JS, or this JS chunk needs updating to show the right 'page' when it loads, or at least it should show an error on the initial category page screen so you know to click through.

lizettal commented 6 months ago

Could put in an error message as a short term fix but agreed that a full fix is a better idea considering no one has raised this as an issue in three years since the work above was done. Estimated at 2-3 days to put in a fix.

sallytay commented 6 months ago

Relates to FD 3820 @sallytay to update the client when needed