3

I have updraded Magento from 2.4.0 to 2.4.5 and now in the product page, there's an error: Uncaught TypeError: Cannot read properties of undefined (reading 'set')

update: function (sections) {
        var sectionId = 0,
            sectionDataIds = $.cookieStorage.get('section_data_ids') || {};

        _.each(sections, function (sectionData, sectionName) {
            sectionId = sectionData['data_id'];
            sectionDataIds[sectionName] = sectionId;
            storage.set(sectionName, sectionData);
            storageInvalidation.remove(sectionName);
            buffer.notify(sectionName, sectionData);
        });
        $.cookieStorage.set('section_data_ids', sectionDataIds);
    },

line 167 in file Magento_Customer/js/customer-data.js

storage.set(sectionName, sectionData);
2

1 Answer 1

1

Afternoon all,

I found the cause for my issue for the same error on step 1 of the checkout with a patchable solution, please see the links below:

Useful information and debugging help: Uncaught TypeError: Cannot read property 'remove' of undefined -- upgrade from 2.3.4 to 2.4.1

Resolved my issue by applying patch from: https://github.com/magento/magento2/pull/31940/files

The issue is caused by customer-data.js file which the above git hub patch updates. I hope this update helps anyone with a similar issue.

1
  • Just to confirm that applying this patch worked for me. Thanks for this information! Oct 3 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.