Confirm Form Resubmission?

  • Posts: 63
  • Thank you received: 2
12 years 1 month ago #69616

Hi Nicolas,

first of all thanks for such a great product and support.

i am having a bit of issue here. some times after viewing the product page or after applying the filter when i click browser's back button it comes up with black page saying "Confirm Form Resubmission".

i have searched a bit and found that its more like security related issue from browser side. however some recommended to use "get" instead of "post" if its not vital.
it would be great if you please put some light on this and any possible solution.

thanks

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

  • Posts: 82818
  • Thank you received: 13361
  • MODERATOR
12 years 1 month ago #69743

Hi,

Using get instead of post in your forms is a solution yes. The problem with that is that all the parameters of the form will go in the URLs, so they won't be SEO anymore. That's why we don't do it.

More info on that here:
www.hikashop.com/forum/3-bug-report/6886...t.html?lang=en#69174

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

  • Posts: 63
  • Thank you received: 2
12 years 1 month ago #69915

thanks thats fine i think i can live with that. just one more thing. apart from product's filter view where else i need this change for minimum "confirm form submission" messages.

thanks

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

  • Posts: 63
  • Thank you received: 2
12 years 1 month ago #70106

hi Nicolas,

i tried this in joomla's index file but its not working any suggestions? thanks

session_cache_limiter('private_no_expire');

i am only having this problem with filters rest is fine.

Last edit: 12 years 1 month ago by leowaqqas.

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

  • Posts: 82818
  • Thank you received: 13361
  • MODERATOR
12 years 1 month ago #70300

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

  • Posts: 63
  • Thank you received: 2
12 years 1 month ago #70409

Thanks Nicolas,

I am having difficulty understanding this. can you please give some more details:

Do i only need to change product's filter view or all the files? do i need to add these hidden fields? as i cannot see them there?

can we reduce the number of parameters in url if we use get because there are lots?

Thanks a lot.


Then, you will have to change all the method="post" to method="get" in the view files of HikaShop.
For products listings it's in the files listing_table and listing_div where you will find that on two different locations for the listing_div view file. You can edit them via the menu Display->Views.
You will also have to add the parameters of the URL as hidden fields inside the form, like that:
<input type="hidden" name="cid" value="<?php echo $_GET; ?>"/>
<input type="hidden" name="ctrl" value="product"/>
<input type="hidden" name="task" value="listing"/>
<input type="hidden" name="option" value="com_hikashop"/>
<input type="hidden" name="Itemid" value="<?php global Itemid; echo Itemid; ?>"/>

Last edit: 12 years 1 month ago by leowaqqas.

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

  • Posts: 82818
  • Thank you received: 13361
  • MODERATOR
12 years 1 month ago #70419

You need to change the product listing_div or listing_table files of the product view, as I explained. There is no need to change the filter view which only handles filters, not pagination.

And yes, you need to add these hidden fields.

You can't reduce the number of parameters in the URL. Otherwise, HikaShop won't work properly. We use the POST method exactly for that purpose of having clean URLs... But then you have the "back" button cache message displayed by your browser.

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

  • Posts: 63
  • Thank you received: 2
12 years 1 month ago #70421

Thanks Nicolas once again i think i am still in trouble here. can you please help me with these questions?

do I need to change both files or any one? because you mentioned "listing_div or listing_table" ?

as i can see there are three forms with "post" methods in each view file. do i need to change all six of them to "get"?

Do i need to put exactly this following code in each of the six forms before </form> tag?

<input type="hidden" name="cid" value="<?php echo $_GET; ?>"/>
<input type="hidden" name="ctrl" value="product"/>
<input type="hidden" name="task" value="listing"/>
<input type="hidden" name="option" value="com_hikashop"/>
<input type="hidden" name="Itemid" value="<?php global $Itemid; echo $Itemid; ?>"/>


thanks in advance

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

  • Posts: 82818
  • Thank you received: 13361
  • MODERATOR
12 years 4 weeks ago #70558

If you use a listing layout display in table, then you need to change the listing_table file, otherwise, the other one. By default, it's the listing_div file which is used.

You should only change the first and the last post of the files. The one in the middle is for the add to cart buttons, not for the pagination.

Then, you need to add the hidden parameters in the first and the last ones.

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

  • Posts: 63
  • Thank you received: 2
12 years 4 weeks ago #70565

Thanks for the response Nicolas.

i did exactly the same but no results. i am adding the altered view file please have a look its right.

I really appreciate your help.

File Attachment:

File Name: listing_div.txt
File Size:7 KB

Attachments:

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

  • Posts: 82818
  • Thank you received: 13361
  • MODERATOR
12 years 4 weeks ago #70722

That's correct. If you don't see any changes, it means that you're editing the file for the wrong template of your frontend. Please check that.

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

  • Posts: 63
  • Thank you received: 2
12 years 4 weeks ago #70818

I have send you login details in PM please have a look. thanks

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

  • Posts: 63
  • Thank you received: 2
12 years 3 weeks ago #71695

Hi Nicolas i have send you the login details by PM 5 days ago. Please have a look. thanks

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

  • Posts: 63
  • Thank you received: 2
12 years 3 weeks ago #71696

Hi Nicolas i have send you the login details by PM 5 days ago. Please have a look. thanks

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

  • Posts: 82818
  • Thank you received: 13361
  • MODERATOR
12 years 3 weeks ago #71995

I've checked the code and the problem is that it can't get the cid from the GET.

I've changed the line:
<input type="hidden" name="cid" value="<?php echo $_GET; ?>"/>
to:
<input type="hidden" name="cid" value="<?php echo reset($this->pageInfo->filter->cid); ?>"/>

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

  • Posts: 63
  • Thank you received: 2
12 years 3 weeks ago #72099

Thanks for the solution but i am still having the same problem with filters. select a filter then go back it should clear that filter but it does not and after doing the same few times its showing the same document expired page again. i have tried replacing the filter views "post" with "get". there is no more expired page problem but it does not work properly.

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

Time to create page: 0.081 seconds
Powered by Kunena Forum