-
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
[2.4.5] Incorrect carrier/method code on selected shipping method in GraphQL #36606
Comments
Hi @DuckThom. Thank you for your report.
Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
For more details, review the Magento Contributor Assistant documentation. Add a comment to assign the issue: To learn more about issue processing workflow, refer to the Code Contributions.
🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket. ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
Hi @engcom-November. Thank you for working on this issue.
|
Hi @DuckThom , |
I agree that the built-in carriers do not use underscores in the codes, however, it's not mentioned anywhere what the allowed characters are for custom carriers. IMO, it would be better if it was either mentioned in the dev docs what the allowed characters are or if some validation is added perhaps. As right now, it can lead to cases such as this one where unexpected data is returned. |
Hi @DuckThom , Scenario 2: Custom shipping method created with underscore in carrier code. Issue: Underscore is missing in Graphql response and the method is not displayed in "available_shipping_methods". |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-7550 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-November. Thank you for verifying the issue. |
❌ You don't have permission to export this issue. |
@magento I am working on this |
Hi @DuckThom , |
Hello, As I can see this issue got fixed in the scope of the internal Jira ticket AC-7550 by the internal team Based on the Jira ticket, the target version is 2.4.7-beta1. Thanks |
@engcom-Hotel: either you made a typo, or the info from Jira is incorrect, because those fixes are not included in Magento 2.4.6? It's probably going to be included in 2.4.7(-beta1)? |
Hello @hostep, That was a typo, I corrected it. Thanks |
Preconditions and environment
Steps to reproduce
available_shipping_methods
andselected_shipping_method
on thecart.shipping_addresses[0]
object returned by GraphQLGraphQL query:
Expected result
The returned
selected_shipping_method
matches with one of theavailable_shipping_methods
carrier and method codes.Result based on above query:
Actual result
There is a mismatch between the carrier/method codes in the
selectedShippingMethod
andavailableShippingMethods
.Result based on above query:
Additional information
The shipping method is saved on the quote as
method.carrierCode + '_' + method.methodCode
In the resolver for the selected_shipping_method field, the following line is present:
magento2/app/code/Magento/QuoteGraphQl/Model/Resolver/ShippingAddress/SelectedShippingMethod.php
Line 53 in ea0cf63
This will split on the first underscore, which is not correct.
Possible solution:
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: