Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 page when using inspector form after a normal update #4845

Open
jonkri opened this issue Feb 13, 2024 · 0 comments
Open

404 page when using inspector form after a normal update #4845

jonkri opened this issue Feb 13, 2024 · 0 comments

Comments

@jonkri
Copy link
Contributor

jonkri commented Feb 13, 2024

Describe the bug

@dracos wrote the following:

If a user has the Manage shortlist permission, then the referrer is stored when loading a report page, and that referrer is then used after the inspector form is submitted, to redirect back to. I think this is so we can try and send someone back to the page they came from - whether that's the /around page, their shortlist page, an all reports page, or so on, but I'm not sure it works in all situations.

In this case, my guess is the municipality made a normal update (which does a POST to /report/update). They then filled in the inspector form and submitted that, and then the auto-redirect after that presumably redirected back to /report/update (as a GET, as that was the referrer) which then returns the 404 as you say (as it's only used for POSTing update forms). I can't see any other way this could happen, anyway. I guess we could try and not use the referrer if the previous page was a POST, which could help with this precise situation, if it is that.

(https://groups.google.com/a/mysociety.org/g/fixmystreet/c/PoYaOZIEN0c/m/9W7DyQbBBgAJ)

To Reproduce

Steps to reproduce the behavior:

  1. Log in as a user with the Manage shortlist permission
  2. Visit a report
  3. Make a normal update (not using the inspector form)
  4. Click the link back to the report (the name of the report)
  5. Make a report assignment using the inspector form

A 404 page is displayed.

Expected behavior

The report page should be displayed.

Screenshots

Sidan hittas ej

Desktop (please complete the following information):

N/A

Smartphone (please complete the following information):

N/A

Additional context

The assignment is carried out even though the 404 message is displayed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant