Magento2: Logged-in user has to re-login before checkout

Created on 24 Nov 2016  路  16Comments  路  Source: magento/magento2


Preconditions


  1. Magento 2.1.2, 2.1.9 PHP7
  2. User is logged in
  3. Guest checkout is disabled

Steps to reproduce

  1. Login in
  2. Add product to cart
  3. In top bar there is text "Welcome Michael Surname", but there is still option to sign-in and sign-up next to it.
  4. Go to cart > checkout
  5. Login prompt is displayed

Expected result

  1. When user is logged-in and "Wecome user" is displayed, there shouldn't be any sign in/up link next to it, just sign out.
  2. User should be able to checkout without re-login in checkout process.

Actual result

  1. User is somehow semi-logged in. Part of Magento detects it, but other part doesn't.
Checkout Customer Fixed in 2.2.x Clear Description Confirmed Format is valid needs update bug report

Most helpful comment

I find it really odd when a bug reported in a minor version(semver) is fixed in another minor version without being backported to the version it was reported in. From my experience, If I dare update to 2.2, I'll find much more bugs introduced there. So updating to 2.2 is a 'NO' for some of us.
Could you point us to the commit that fixed this issue, so we can create a patch for the 2.1.x branch, if Magento does not see this issue as critical enough to be backported? Thank you.

All 16 comments

@sigismund thank you for the report!
Tried these steps on the develop branch and on v2.1.2 but didn't reproduce it.

Go to cart > checkout

Does it mean clicking "Go to Checkout" button on minicart?
What were your other steps after installation? Did you perform any configuration changes?

In top bar there is text "Welcome Michael Surname", but there is still option to sign-in and sign-up next to it.

@sigismund it seems you customer session is expired. In such case Magento leaves "Welcome Michael Surname"(it's a bug), but shows "Sign In" link.

Same issue with 2.1.2. I cannot checkout. The system thinks I'm logged out even though I login a bunch of times. I get the Welcome (name) on top, but still shows "sign in" link. I cannot make a purchase no matter what I do. Damn, I wish I never installed this version for a production site. It has been a year and I cannot even make an order on the front end.

Same issue with 2.1.0. Is there a fix for this issue ?
I found this 2 related issue #6759 & #4589

Hi, I have the same issue on 2.1.7, did anyone know if a fix is ongoing ?

@Kentricks could you please provide more information then?
Please specify which versions of OS, web-server, PHP, MySQL you use.
Do you use any external extensions?
Do you use persistent shopping cart functionality?
Did you change value for Online Minutes Interval? (Stores > Settings > Configuration > Customers > Customer Configuration -> Online Customers Options)
Could you please provide a screenshot?

magento v. 2.1.9 and the problem persists!

@elisei thank you for update. We updated issue description

We cannot reproduce this issue as described. Please provide the detailed steps we must follow to reproduce this issue. In addition, and any other information needed to reproduce your issue.

hello follows an error gif.
sep 21 2017 12-03 pm

Process I've already tried based on the guideline here:

  • Checkout persistence on/off
  • Change session time
  • Turn on/off the checkout in anonymous method

I have extra extensions:
smtp - mageplaza
moip (which I'm developing now).
I've tried uninstalling them but the problem continues.

Php v, 7.0.23 ubuntu14.04.1

@sigismund, thank you for your report.
The issue is already fixed in 2.2.0

I find it really odd when a bug reported in a minor version(semver) is fixed in another minor version without being backported to the version it was reported in. From my experience, If I dare update to 2.2, I'll find much more bugs introduced there. So updating to 2.2 is a 'NO' for some of us.
Could you point us to the commit that fixed this issue, so we can create a patch for the 2.1.x branch, if Magento does not see this issue as critical enough to be backported? Thank you.

I couldn't agree more. Moving from 2.1.9 to 2.2.0 means being forced to PHP 7.0+ as well. Which, in our case - on this system, isn't an option.

It would be truly useful to patch 2.1.9- to fix this issue.

Any updates on the issue? I know that asking for a fix might be too much, but, at least, did anyone find a stack trace for the bug so the community might give it a chance into fixing the issue?

Could you write the code branch that how to fix this bug here, please? We can't update to Magento 2.2 in short period. Thank you very much

For those still experiencing this issue, this is the commit that fixes it:
https://github.com/magento/magento2/commit/861f596371825d9e24672cd613229ae9486c635f
. Digging into the code, this only applies if your request is a 'POST' request - that makes sense.
If your request for some reason, is not a 'POST' request, you may need to make some modification

Was this page helpful?
0 / 5 - 0 ratings