Uploaded image for project: 'Commenting (closed)'
  1. Commenting (closed)
  2. MGNLCMNT-67

Posting comments should use the POST-REDIRECT-GET pattern

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Critical Critical
    • 1.2.2
    • 1.2.1
    • None
    • None

      Adding a comment is done using a POST request, as a response the page is rendered with the new comment added.

      If the user then tries to reload the page the browser will ask if the user really wants to resubmit form data. If the user agrees then the comment is added to the page again. If the user goes back using the back button he/she will also get the warning when using the forward button to return to the page. This also happens if the user navigates from the page with the comments and then goes back.

      The commenting component should return a redirect when it has added the comment making the browser execute a GET request to see the page with the comment added. The POST and redirect don't become part of the history so the user can freely navigate back and forth and reload the page without the warning.

      This should be trivial to implement using the model execution feature added in 4.4.

        Acceptance criteria

              tmattsson Tobias Mattsson
              tmattsson Tobias Mattsson
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: