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

'customer' customer-data section is not being refreshed on the first page after login #13984

Closed
koenner01 opened this issue Mar 7, 2018 · 4 comments
Labels
Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Progress: needs update

Comments

@koenner01
Copy link
Contributor

On the first page you arrive on after login, the customer-data section 'customer' is not reloaded.
This will cause issue for scripts relying on the 'customer' section.

Preconditions

  1. PHP7.0
  2. Tested on CE 2.1.11 and CE 2.2

Steps to reproduce

  1. Create a js script that is placed on every page; It should at least contain:
define([
    'jquery',
    'Magento_Customer/js/customer-data',
    'domReady!'
], function ($, customerData) {
    'use strict';
    var customer = customerData.get('customer');
    console.log(customer());
});
  1. Login on the the frontend through 'customer/account/login'

Expected result

  1. The 'customer' customer-data section should contain customer information

Actual result

  1. The 'customer' customer-data section is an empty object

If you output the steps of the invalidate and reload function in Magento/Customer/view/frontend/web/js/customer-data.js you will see that the request is invalidating

    ["*", "messages"]

The '*' is a wildcard to invalidate every section (which you can see in

    sectionsNamesForInvalidation = _.contains(sectionNames, '*') ? buffer.keys() : sectionNames;

If you output the 'sectionsNamesForInvalidation' variable you can see that the customer section is one of those sections.

After the login action you arrive on a page (default this will probably be the my account dashboard) and you will see that the customer section is not being reloaded.

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Mar 7, 2018
@magento-engcom-team magento-engcom-team added the Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed label Mar 7, 2018
@magento-engcom-team
Copy link
Contributor

@koenner01 , thanks for the report. Unfortunately we cannot reproduce this issue wit given steps. Please provide more detailed steps to reproduce, or try to reproduce this issue on clean installation.

@magento-engcom-team magento-engcom-team added Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Progress: needs update labels Mar 7, 2018
@magento-engcom-team
Copy link
Contributor

@koenner01 we are closing this issue due to inactivity. If you'd like to update it, please reopen the issue.

@magento-engcom-team
Copy link
Contributor

@koenner01, we are closing this issue due to inactivity. If you'd like to update it, please reopen the issue.

@giordhano
Copy link

Same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Progress: needs update
Projects
None yet
Development

No branches or pull requests

3 participants