-
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
Local storage is cleaned if persistent shopping cart is enabled #13690
Comments
@alexber88, thank you for your report. |
Working on it #MLAU18 |
Not able to reproduce on 2.2.2 @alexber88 are you loading your cart on the same HTTP / HTTPS socket as when you checked out? In my case, checkout is on HTTPS and when loading cart on HTTPS, the selecting shipping method and totals are showing correctly. |
@btwq i'm using http. |
The same issue on Magento 2.2.2 and 2.2.3 To quickly reproduce the issue you need to
Expected result: Actual result: We have done a digging into the code, so
is always TRUE if persistent shopping cart is enabled and you visit the website as a guest, so the "mage-cache-sessid" cookie key is always removed.
and \Magento\Persistent\Model\Session::renewPersistentCookie is also called only for customer in |
#mhlej18 |
@magento-engcom-team give me 2.2-develop instance |
Hi @therouv. Thank you for your request. I'm working on Magento 2.2-develop instance for you |
Hi @therouv, here is your Magento instance. |
I can't reproduce this issue on a vanilla 2.2-develop instance with the described steps. Seems to be fixed in the latest version. I enabled guest checkout and persistent shopping cart in store configuration: I added a category and product and then added the product to the cart. After I visited the checkout for the first time the values are empty (which is correct since I'm not logged in): I then entered a firstname and lastname and hit the refresh button of my browser multiple times. After every time when the page rendered, the entered values were still present in the firstname and lastname field. See recorded screencast of the followed steps here |
Oh, it was tricky! I am still able to reproduce it on vanilla. Server details
PreconditionsFirst,
So that it is the latest and the most vanilla magento I can imagine:
Additional informationIn order to fail transaction you need to use the following payment data: See https://developers.braintreepayments.com/guides/credit-cards/testing-go-live/php Steps to reproduce
Expected resultsShipping address information is still on place Actual results |
I am also seeing this error on 2.2.6. I could see the issue once I had something in my basket and was not logged in. I could then see the XHR Network requests in the browser calling After going through some code I can see the same thing as @magefan in that the backend code Then the frontend
The backend will then clear this cookie again causing the FE to reset and clear storage - and so forth. This issue only happens when persistent mode is enabled. The backend observer gets from "persistent_session_expired" which is dispatched from
Hope this helps. |
I can confirm this is still in Magento 2.3.0 Is the solution to disable "RefreshCustomerData" Observer ? |
I have noticed the same bug in M2.3 with PHP7.2. I was logged in as a client in a demo environment in two browsers at the same time. After I returned from a lunch I refreshed the page and in firefox an empty collection was returned on all pages. |
We faced with the same problem. It is already fixed in 2.3: https://github.com/magento/magento2/blob/2.3.0/app/code/Magento/Persistent/Observer/CheckExpirePersistentQuoteObserver.php BUT if you, as guest user, go to checkout, fill in the shipping data. Than you decided to buy another product and you go to some PDP, return back to checkout and your address becomes empty. |
I'm seeing the same issue, it seemed much easier to reproduce on Magento Commerce version. Seems like the easy solution is to disable "RefreshCustomerData"observer as @kpitn mentions. But the original commit message "My Wishlist control contains incorrect info after longterm session is over" doesn't give much insight into the original reason why this observer was added. I don't like just removing things, but I'd rather have the postcode/selected shipping method be correct than some hard-to-reproduce wishlist issue. |
I have upgraded the magento version from 2.2.5 to 2.2.8 and in 2.2.5 persistent shopping cart was disable so in 2.2.5 my custom code of storing some dynamic data(data source was some url) in LocalStorage with help of sections.xml was working good but it is not working with 2.2.8 but in 2.2.8 it works with logged-in user. What can be the possible solution. |
Hi @engcom-Echo. Thank you for working on this issue.
|
Hi @engcom-Bravo. Thank you for working on this issue.
|
Hello @alexber88 As for the comment #13690 (comment) We are closing this issue. |
Preconditions
Steps to reproduce
Expected result
Actual result
Additional information
The text was updated successfully, but these errors were encountered: