Skip to content

JS error in the customer data #31920

Closed
Closed
@ihor-sviziev

Description

@ihor-sviziev

Originally this issue was reported in 5983e17#commitcomment-44080850 by @HenKun.

The following commit 5983e17 leads to similar issues described in #24847.

Preconditions (*)

  1. Magento 2.4.1, or 2.4-develop

Steps to reproduce (*)

  1. Add the following code to the page on frontend:
<script>
    require(['Magento_Customer/js/customer-data'], function (customerData) {
        console.log(customerData.getExpiredSectionNames());
    });
</script>
  1. Go to the frontend, see the console

Expected result (*)

  1. In the console you should see an empty array, like this:
    image

Actual result (*)

  1. in the console we see the following error:
    image

Additional info from Engcom

Add the script to, for example, /app/code/Magento/Customer/view/frontend/templates/form/edit.phtml
script

  1. In the Storefront, Sign In as a Customer
  2. Go to My Account
  3. Click Edit under Contact Information
  4. Observe the dev console

Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

Labels

Area: AccountComponent: CustomerIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: doneReported on 2.4.1Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S3Affects non-critical data or functionality and does not force users to employ a workaround.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions