Form resbumission on back button click

  • Posts: 36
  • Thank you received: 0
6 years 1 month ago #289874

-- url of the page with the problem -- : dev.rosenschule.de
-- HikaShop version -- : 3.3.0
-- Joomla version -- : 3.8.6
-- PHP version -- : 5.6.34
-- Browser(s) name and version -- : all
-- Error-message(debug-mod must be tuned on) -- : Confirm Form resubmission

Hello!

When pressing the back button of the browser on a product page after i got there from a filtered listing, the browser asks me to resubmit the filter form.
I am aware of this topic and the config option to redirect POST requests.
The problem on my page is the large number of custom fields which are used for filtering. Putting them all into the url works for a few requests, but that breaks eventually with Error 414 Request-URI too long. (steps to reproduce: Filter on more than one field, then remove one of the filters. that produces an URL longer than 2000 characters after a few repeated tries).
At the moment i use a on site back button but would like the user to be able to use the browser back button too.

Reply or send a PM and i will send you the login credentials for the site.

Thanks for any advice,
svanschu

Last edit: 6 years 1 month ago by svanschu.

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
6 years 1 month ago #289899

Hi,

Indeed, to avoid that, turning on the "redirect POST mode" setting is the solution I would recommend.
However, the URL shouldn't grow that much. I would need to look at the issue on the website to assess whether it's a problem with the number of parameters or if there is a bug and something can be done in the code.

You can send the access via our contact form along with a link to this thread:
www.hikashop.com/support/contact-us.html

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
6 years 1 month ago #289941

Hi,

That looks like a bug. Try changing the option "Server current URL mode" of the HikaShop configuration. Your server might have a strange setup.
If that doesn't help, we'll need a backend and FTP access to be able to do some debugging.

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

  • Posts: 36
  • Thank you received: 0
6 years 1 month ago #289981

Hi nicolas,

Changing Server current URL Mode from REDIRECT_URL to REQUEST_URI seems to have solved the problem. Thank you!

Also, just fyi, when leaving the setting on REDIRECT_URL each change in the filter form seems to append all fields to the current URL, including all previous filter settings.

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
6 years 1 month ago #289982

Hi,

The default value of that option is REQUEST_URI. So you must have changed it for some reason.
This option should only be changed if you have issues with the URLs similar to the one you had, which indicates that your server doesn't support properly the mode selected in the option.
In 98% of the cases, REQUEST_URI is what is supported and what should be selected.

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

Time to create page: 0.062 seconds
Powered by Kunena Forum