Hallo. I have used the option "Update product display based on customer selections" and every time i change an attribute option, the updated price appears. So far so good.
After the products are added to cart, we proceed to checkout. Then, if we decide to press the back button in the browser, when we try to change an attribute, an error dialog comes up stating an ajax error.
In the logging details, a message appears stating "Invalid form POST data." Any ideas?

Comments

TR’s picture

I'm confused - what page are you on? When you press Back from the checkout page you should go back to the cart page. You can't change attributes on the cart page ...

Jonesgr’s picture

Sorry for not being clear in the first post. I have configured ubercart to redirect immediately to cart/checkout page after pressing add to cart. Attribute selection is realized normally in the product screen where we select the quantity and the attributes. After the first selection, we press "add to cart" button and go to checkout. After that, if we press the back button on the browser, and we return to the product screen to select the attributes again, the problem stated before occurs. Thanks.

longwave’s picture

Title: Ajax Problem in attribute selection » Back button can cause inconsistent Ajax state for product attributes
Component: Cart/checkout » Products
Jonesgr’s picture

Just a simple solution I can think of, would be to auto refresh the page, when visited. This can be done by using drupal_add_http_header and the correct meta tags. I will give it a try.

ajlozier’s picture

For those who are using Safari and have found that no-cache headers and the onunload attribute still seem to not resolve the problem, I would encourage you to check out this blog post I just wrote:

http://www.informationarchitech.com/blog/safari-auto-complete-bug-affect...

What I eventually figured out was that Safari was "restoring" the previous form_build_id (even if the page was NOT loaded from cache) which in turn was triggering the ajax error (re-use of a "one time use" token)

Hopefully this will save others the hours of struggle I went through to figure it out!

I am also reposting this comment on a few other issue reports which seem similar.