Skip to content
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

Cookie Messages on Login Page not cleared when ElasticSuite Tracker is active #1291

Closed
DanieliMi opened this issue Jan 30, 2019 · 5 comments
Closed
Assignees
Projects

Comments

@DanieliMi
Copy link
Contributor

Preconditions

Full elasticsuite installed
Catalog is protected by login

Magento Version : 2.2.6
ElasticSuite Version : 2.64
Environment : Developer or Production
Third party modules : Quite some :-)

Steps to reproduce

  1. Login to the shop with a wrong password
  2. Flash messages 'You did not sign in correctly or your account is temporarily disabled.' is shown
  3. Login with right password
  4. On the start page, still the message is shown, which should not

not 100% reproducible in Chrome, but in Firefox quite well

Expected result

  1. Flash message should appear only once

Actual result

Logged in page with
selection_239

Debugging

First we inserted some debug code - the cookie is removed properly

selection_234

as you can see
selection_233

We think it is caused by the fact that the tracker's h.png is loaded BEFORE messages.js kicks in, and thus sends the cookies to the server. Then in the next request, Magento sends this cookie message again.

developer tools - sata shop - http --shop sata com magento weide imi local-dealer_de_de-_232

For now we disable the tracker, but it would be great if this could be fixed.

@romainruaud romainruaud added this to To do in Release 2.6.7 via automation Feb 15, 2019
@romainruaud romainruaud added this to To do in Release 2.7.5 via automation Feb 15, 2019
@rbayet rbayet self-assigned this Feb 22, 2019
@rbayet
Copy link
Collaborator

rbayet commented Mar 1, 2019

Confirmed on EE 2.2.6 with a basic "Private Sales" website restriction applied :

ee226_website_restriction

ee226_private_sales_postlogin

@rbayet rbayet added this to To do in Release 2.6.8 via automation Mar 4, 2019
@rbayet rbayet removed this from To do in Release 2.6.7 Mar 4, 2019
@rbayet rbayet added this to To do in Release 2.7.6 via automation Mar 4, 2019
@rbayet rbayet removed this from To do in Release 2.7.5 Mar 4, 2019
@rbayet rbayet added this to To do in Release 2.6.9 via automation Mar 28, 2019
@rbayet rbayet removed this from To do in Release 2.6.8 Mar 28, 2019
@rbayet rbayet added this to To do in Release 2.7.7 via automation Mar 28, 2019
@rbayet rbayet removed this from To do in Release 2.7.6 Mar 28, 2019
@southerncomputer
Copy link
Contributor

I have modified tracking,js to be called by config.phtml and variables.phtml using requirejs - which should be how the js is called with domReady! to delay it from being called too early. I'd suggest it is implemented this way anyhow! Magento 2.3.1 does some erratic behavior with javascript load/execute order as you are seeing!

@romainruaud
Copy link
Collaborator

@southerncomputer can you publish your patch as a PR ?

@southerncomputer
Copy link
Contributor

unfortunately, it is still having this problem of being caught by Private site restrictions and getting a 302 to customer/account/login/ . I had to whitelist the url for now otherwise you get wonky page loads within page-loads which amplified by javascript actions cause double event-firing and the login referer script redirects to hit.php.. etc. It must be the way tracking.js is calling hit that is messing with everything, i'm guessing it is not using xhr/xmlhttprequest/jsonp method to bypass the security frontend modules!

@rbayet rbayet added this to To do in Release 2.9 via automation Aug 27, 2019
@rbayet rbayet removed this from To do in Release 2.6.9 Aug 27, 2019
@rbayet rbayet removed this from To do in Release 2.7.7 Aug 27, 2019
@romainruaud
Copy link
Collaborator

I close, this issue is too old. Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Release 2.9
  
To do
Development

No branches or pull requests

4 participants