Skip to content

magento/magento2#12362 [2.2] Do not remove session instantly#14487

Closed
swnsma wants to merge 4 commits intomagento:2.2-developfrom
swnsma:magento#12362-SessionId-Lost-After-Multiple-Reloads-2.2
Closed

magento/magento2#12362 [2.2] Do not remove session instantly#14487
swnsma wants to merge 4 commits intomagento:2.2-developfrom
swnsma:magento#12362-SessionId-Lost-After-Multiple-Reloads-2.2

Conversation

@swnsma
Copy link
Copy Markdown
Contributor

@swnsma swnsma commented Apr 1, 2018

Give configurable time delay to capture session id.
Remove old sessions only after new session id cookie was received.

Description

Current pull request contains fix for the issue #12362.
Problem related to specific case of session work in PHP.
In case of call function 'session_regenerate_id(true)' there is required to be sure that renewed cookie will be successfully delivered to the browser.
Current PR provide functionality to keep old session till customer will not receive cookie.

Fixed Issues

  1. Concurrent (quick reload) requests on checkout cause cart to empty - related to session_regenerate_id #12362: Concurrent (quick reload) requests on checkout cause cart to empty - related to session_regenerate_id
  2. [2.1.11] Add to cart, try to checkout, cart is empty but mini-cart has items. #13427: [2.1.11] Add to cart, try to checkout, cart is empty but mini-cart has items.
  3. Hit fast twice F5 on checout page, customer loggs out automatically #4301: Hit fast twice F5 on checout page, customer loggs out automatically

Manual testing scenarios

Pre-Conditions

  1. Magento 2.2.0
  2. PHP7

Steps to reproduce

  1. Add product to cart
  2. Navigate to checkout
  3. Reload the page as quick as possible (F5 multiple times)

Expected result

  1. Reload the checkout as usual
  2. Cart contains session items

Actual result

  1. Redirects to empty cart

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@swnsma swnsma changed the title magneto/magento2#12362 [2.2] Do not remove session instantly magento/magento2#12362 [2.2] Do not remove session instantly Apr 3, 2018
al.kravchuk added 4 commits April 6, 2018 23:29
Give configurable time delay to capture session id.
Remove old sessions only after new session id cookie was received.

(cherry picked from commit dd7e7e9)
Move session calls to separated and shared session storage.
Suppress Warnings.

(cherry picked from commit 088a836)
Remove changing of configureation settings.
Adjust session forwarding.
@orlangur orlangur self-assigned this Apr 9, 2018
@orlangur orlangur added this to the April 2018 milestone Apr 9, 2018
@orlangur
Copy link
Copy Markdown
Contributor

orlangur commented Apr 9, 2018

Closing in favor of implementation which is going to be provided by core team: #14428 (comment)

@swnsma thanks for collaboration!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants