[ https://issues.apache.org/jira/browse/DRILL-7203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16837954#comment-16837954 ]
ASF GitHub Bot commented on DRILL-7203: --------------------------------------- kkhatua commented on pull request #1787: DRILL-7203: Back button not working URL: https://github.com/apache/drill/pull/1787 The root cause of this bug is that when a form is submitted, Drill uses the POST mechanism via an AJAX call. The response is then used to swap the existing `/query` page's DOM. This means that the browser history does not capture the change because the URL has never changed. As a result, when the user hits the `[BACK]` button, the call is made to the browser which redirects to the last page visited just before `/query`. Changing the AJAX call mechanism is risky, so the workaround was to leverage the `sessionStorage` feature supported by most modern (and secure) browsers. When a query is submitted, `sessionStorage` is used to cache the submitted query (like a session/cookie). If the back button on the page is hit, an additional flag is set, telling the Javascript to revisit the submission page and use the _cached_ query. If the submission page is revisited via any other mechanism, it is assumed that the `[BACK]` button was not pressed (since the additional flag is not set), and the cached query is cleared from the browser memory. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Back button for failed query does not return on Query page > ----------------------------------------------------------- > > Key: DRILL-7203 > URL: https://issues.apache.org/jira/browse/DRILL-7203 > Project: Apache Drill > Issue Type: Bug > Affects Versions: 1.16.0 > Reporter: Arina Ielchiieva > Assignee: Kunal Khatua > Priority: Major > Fix For: 1.17.0 > > Attachments: back_button.JPG > > > Back button for failed query returns on previous page before Query page but > not on the Query page. > Steps: > 1. go to Logs page > 2. go to Query page > 3. execute query with incorrect syntax (ex: xxxxx) > 4. error message will be displayed, Back button will be in left corner > (screenshot attached) > 5. press Back button > 6. user is redirected to Logs page -- This message was sent by Atlassian JIRA (v7.6.3#76005)