osmbc icon indicating copy to clipboard operation
osmbc copied to clipboard

comment gets added twice when going back

Open Strubbl opened this issue 4 years ago • 1 comments

e.g. https://osmbc.openstreetmap.de/article/26252

How did i do this:

  1. set article to unplished
  2. do not provide a reason
  3. enter a comment (below, so a usual article comment)
  4. hit save
  5. Now we have the comment saved.
  6. On the following page i am warned that i forget to enter an unpublish reason.
  7. So i hit the button "go back".
  8. Now we have the comment saved twice.

Strubbl avatar Jan 24 '22 19:01 Strubbl

I put that our of the bootstrrap 4 milestone, as the possibility to create this bug is small and the impact (one comment shown twice) is acceptable.

The issue is, that the browser first saves the comment and is then missing to refresh the page content. so that the back button of the browser or the error page is reloading the wrong content.

This can be either solved by improving the error handling (especially the back button) or ad the refresh page after comment saving.

TheFive avatar Jan 30 '22 10:01 TheFive