-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[Backward compatibility] Customer section load with one section causes an error #28154
Comments
Hi @zhartaunik. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. @zhartaunik do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
I confirm the bug, is anyone upgrade to 2.3.5 ? When cart section reload url is : (decode = http://xxxx/customer/section/load/?sections=c,u,s,t,o,m,e,r&_=1590406308206 |
confirm bug, with version 2.3.5-p1 http://***/customer/section/load/?sections=w%2Ci%2Cs%2Ch%2Cl%2Ci%2Cs%2Ct&_=1594592363309 decode = http://***/customer/section/load/?sections=wishlist&_=1594592363309 |
This happens when you get bad data in |
✅ Confirmed by @engcom-Alfa Issue Available: @engcom-Alfa, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself. |
Hi @zhartaunik. Thank you for your report.
The fix will be available with the upcoming 2.4.2 release. |
http://***/customer/section/load/?sections=w%2Ci%2Cs%2Ch%2Cl%2Ci%2Cs%2Ct&_=1594592363309 decode = http://***/customer/section/load/?sections=wishlist&_=1594592363309 for this issues i just removed the comma(under join) in customer-data.js the issues is fixed for me before change after change |
Preconditions (*)
Steps to reproduce (*)
Open any page and take any action which force Magento to clean one section (In my case it was adding product to shopping cart from PDP)
Source code should contain sth like
customerData.reload('cart');
instead of
customerData.reload(['cart']);
Expected result (*)
The console log must be clear.
Actual result (*)
We faced with an issue in console:
customer-data.js:87 Uncaught Error: [object Object]
at Object. (customer-data.js:87)
at fire (jquery.js:3238)
at Object.fireWith [as rejectWith] (jquery.js:3368)
at done (jquery.js:9848)
at XMLHttpRequest.callback (jquery.js:10317)
What actually happens:
www/magento/vendor/magento/module-customer/view/frontend/web/js/section-config.js:61
Previous code:
Magento 2.3.5-p1 code:
When we pass into this function one element (string) JS parses as an array:
And of course cannot find such sections.
Upd 1.
Initially, your method accepted anything and we passed a string with a section name. Now your are accepting arrays only, but there no such verification in the method.
I suppose for backward compatibility you should return back isArray verification.
The text was updated successfully, but these errors were encountered: