-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[2.1.11] Add to cart, try to checkout, cart is empty but mini-cart has items. #13427
Comments
@aeu, thank you for your report. |
I can reproduce this in Magento 2.2 too. |
We are having the same issues on 2.1.11 Commerce with Redis for session storage. |
Try to disable the FPC cache i have the same issue i think the checkout page has been cached when it was empty |
What is the status on this issue? We see it also and it is a huge issue for an ecommerce platform. |
We are on 2.1.12 with composer so we temporarily (till we will find an official fix for 2.1.x) replaced \Magento\Framework\Session\SessionManager of Magento 2.1.10 https://github.com/magento/magento2/blob/2.1.10/lib/internal/Magento/Framework/Session/SessionManager.php which hasn't such issues by placing it one folder Lib/Framework/Session of our module.
That is solving for now. Otherwise a simpler fix without composer can be by placing the same SessionManager of 2.1.10 in your own lib/internal/Magento/Session folder |
@elioermini For what it's worth, I did not have luck with reverting the core code. I believe it is related to using PHP 7 - the fix I eventually was successful with is here: #12362 (comment) Looking at the 2.2.3-develop branch, it seems that the Magento team is trying out the reverting solution as well, but I don't think that is going to be the solution here. As someone pointed out in the linked thread, it would be nice to know specifically what risk Magento is trying to mitigate with the regenerate_session_id() call when going to checkout, as it is tempting to just remove that line altogether. |
@allisonlawrencels Thanks for linking that other issue, that was a very interesting read. We are experiencing the exact same thing described in that thread - if you go to checkout, hit refresh a few times quickly and then the cart is empty. I'll take a look at the solution that acetronaut posted and see if we can get that working here, we are currently on 2.1.12. |
@allisonlawrencels exactly see my comment in #12362 we found out as well after a while the same fix you referenced but I forgot to amend it here. It is also solving this issue #4301 the only change in addition to #12362#issuecomment-373318974 I added in |
Hi @aeu. Thank you for your report. The fix will be available with the upcoming 2.2.5 release. |
Hi @aeu. Thank you for your report. The fix will be available with the upcoming 2.3.0 release. |
I see that this is fixed in 2.3.x and 2.2.x, is there any chance of a fix in the next 2.1.x update as well? |
same issue on 2.1.12, cart is empty. |
Resolved issues: * magento/magento2#4301 * magento/magento2#12362 * magento/magento2#13427
I'm on 2.2.6 and I can still replicate the issue. |
Replicated on 2.2.4 |
Issue
We have been getting reports from users saying that they added product to cart, tried to checkout, but when they go to the cart, the cart was empty, but the mini-cart still showed products.
We have been getting customer complaints about this issue in every release of Magento 2 we have used since October, up to and including our current implementation which is 2.1.11.
This has obviously been a nightmare to debug, but we have figured out how to reproduce it 100%, in Luma.
Preconditions
Dedicated server,
Magento 2.1.11.
CentOS 7.3.
PHP 7.
MariaDB.
Double Redis (session and cache).
Images on a CDN.
Steps to reproduce
Actual result
The user will be directed to a cart page saying there are no items in the cart, but the mini-cart will still have contents.
Expected result
The cart should have items in it.
Misc
I believe that this is probably related to the "Hit refresh multiple times fast in checkout and your cart will be empty" bug edit which can be referenced here - #12362
Fix
We added some client-side code to disable the "checkout" button after it was clicked, which solves this issue. This obviously does not resolve the fundamental problem (double refresh on checkout page clears cart) but it should be done anyway if for no other reason than to reduce server load. We can create a pull request for this if needed.
The text was updated successfully, but these errors were encountered: