Closed atsareva closed 7 years ago
I wonder if this issue is in anyway related to this one: https://github.com/magento/magento2/issues/11314?
The steps to recreate are similar. @atsareva - just out of curiosity are you using Varnish?
Hi @josh-nh, This is another issue and it depends only on ajax calls with post type on the checkout. Also this issues occurs only for guests and customer's data object is reset on the front. Therefore customer and quote sessions are ok. I faced this issue on my local env with magento fresh installation (without Varnish).
@atsareva we have the same issue on our project, it's driving us insane.
@atsareva, thank you for your report. We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue. We tested the issue on 2.3.0-dev, 2.1.10, 2.2.1
Hi @magento-engcom-team ,
I've tested this issue on magento 2.2.0 and 2.2.1 too and reproduced on both versions.
However I've reinstalled magento again
added ajax (type: POST) call to vendor/magento/module-checkout/view/frontend/templates/onepage.phtml
created controller
fill address on the first step of checkout and go the second page
press F5
but any errors in console or in the log, also ajax got 200 response
I understand that this is not typical issue. We had to update project from 2.1.9 to 2.2.0 to fix some critical issue with disappearing products during reindex. But now we stuck with this issue. Because a about 4 important extension uses ajax on the checkout.
Thanks, Alena Tsareva
Hi @magento-engcom-team, Please could your reopen this issue and try to reproduce again. In the comment above I've attached a lot of screenshots, maybe this is help you.
I think this is some security issue, because AJAX with GET type works fine instead of AJAX with POST.
Recently we got a patch for popup extension. They also reproduced this issue and changed POST calls with GET.
Thanks, Alena Tsareva
@atsareva did you fixed this issue? it happend to me too
Hi @mvaisberg , I've found all ajax calls on checkout and replaced 'POST' type with 'GET' one. This is temporary solution, but it works.
@atsareva Thanks for answering!
I just found one 'POST' and replaced with 'GET' on
vendor/magento/module-checkout/view/frontend/web/js/sidebar.js line 258.
Did you remember someone else?
@mvaisberg hm...in my case it was only due to custom extensions, as I remember custom payment method, google analytics and popup extensions. I didn't face with this issue using default magento.
Hello,
Magento Page Cache module changes privat content version cookie each post request.
So make a plugin for this place and add your check:
http/vendor/magento/framework/App/PageCache/Version.php
Hi guys!
Recently I've updated a magento project with 2.2 version and noticed the next issue. If you add some products to cart and go to checkout page,fill shipping address, go to the next step and then reload a page, customer data is disappeared. So customer can't place order because he doesn't have an address but he also doesn't see any errors.
Further investigations show that this issue happened due to ajax calls on the checkout page. Our project contains a lot of extensions which use ajax (type: 'post') to set some data e.g popup extension to set a cookie, GTM - to build an additional block to track checkout steps, payment provider - to update some fields, etc... When I disabled these extension, checkout works like it should.
I've installed clean version of magento 2.2.0 with sample data and hardcoded the next ajax call to the onepage.phml
Controller returns only one line -
echo json_encode(['success' => true]);
In this case a got the same error!Note. This code was added only to test ajax. This issue occurs only if type of ajax is POST.
Steps to reproduce
Also you can get the same issue, when 1,2,3,4. The same
Preconditions
Thanks, Alena Tsareva