Browser navigation error

  • Posts: 15
  • Thank you received: 0
9 years 5 months ago #180735

Dear,

Im using the hikashop filter module to let customers sort their products. After filtering the products based on the several fields of the filter module there is a product list of all the products based up on the filter criteria. When clicking on a product it redirects to the productpage. The problem occurs when i try to use the browser (chroome, firefox) navigation to go back to the previous page. The browser provides me with a blank page which tells me the page could not be found, cache problem. (i can get a screenshot of the blank page with the error if necesarry)

The same blank page shows up when i use the hikashop page navigation at the bottom of each product listing page to go to the next page with products. For example i try to use the Hikashop navigation on the product listing page to go to page 2. After clicking on a product it redirects to the productpage. When trying to use the Browser navigation to go to the previous page it presents the same blank page which tells me the page could not be found, cache problem.

Please help to solve this problem.

Please Log in or Create an account to join the conversation.

  • Posts: 81563
  • Thank you received: 13071
  • MODERATOR
9 years 5 months ago #180761

Hi,

That's the normal behavior and is quite common.
When data is posted to the server and that the server replies with a page display, if you use the history of your browser, most recent browsers will display an alert page with a link to resubmit the data and you need to click on the link to see the page.

The mechanism has been added by web browsers several years ago to prevent users from submitting several times the same stuff (to avoid duplicate credit card payments for example).

A solution you can use if you don't want that is to add such line:

if ($config->get('redirect_post',1) && $_SERVER['REQUEST_METHOD'] === 'POST' && (empty($this->module) || JRequest::getVar('hikashop_front_end_main',0))) {$app->redirect(hikashop_currentURL());}
after the code:
$dispatcher->trigger( 'onBeforeProductListingLoad', array( & $filters, & $order, & $this, & $select, & $select2, & $a, & $b, & $on) );
of the file components/com_hikashop/views/product/view.html.php so that there will be a redirect to the current page after the post data has been saved in the session and avoid that behavior.

Last edit: 9 years 5 months ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 15
  • Thank you received: 0
9 years 5 months ago #181342

Tried it but doesn't change anything. Its still not possible to use the next and previous button of the browser after using pagination or after using the field of the characteristics on the productpage. This is major problem in my opinion because most of the people use the next and previous buttons of their webbrowser to navigate through a website.

Please Log in or Create an account to join the conversation.

  • Posts: 81563
  • Thank you received: 13071
  • MODERATOR
9 years 4 months ago #183225

We've worked on that and next version of HikaShop will have a new option in order to be able to pass the pagination/filters selection in the URL and thus avoid the browser history back/next button message.
Note that even without changing this, we noticed that Chrome was now handling the back button properly with recent versions, without any message.

Please Log in or Create an account to join the conversation.

Time to create page: 0.058 seconds
Powered by Kunena Forum