0

I have added Drupal Commerce in an existing D7 site and I use the existing product nodes, in which I have added the Add to cart form. Everything looks nice and works fine, except for one thing. When a user adds an item into the cart and then tries to go back one step by clicking the browser back button, he or she stays on the same page. So the user must click twice to go back one step. The history information about previuos pages, must still be there since one lands on the correct page, after clicking twice.

Maybe I should mention that I use Authcache with Ajax calls to fetch the Cart block on cached pages, but i think this behaviour started before I installed Authcache.

How can I fix this?

1 Answer 1

0

While, not an specific answer. Just to point out another possibly cause, this could be caused by JS.

https://developer.mozilla.org/en-US/docs/Web/API/History_API#Adding_and_modifying_history_entries

Basically, there are ways of modifying the history via JS. There might be some code somewhere that's introducing this. Not sure which module though.

Assuming JS, what you probably should look into is calls to,

 history.pushState() 
 history.replaceState()
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.