Closed DuckThom closed 1 year ago
Hi @DuckThom. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:
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:
@magento give me 2.4-develop instance
- upcoming 2.4.x release
For more details, review the Magento Contributor Assistant documentation.
Add a comment to assign the issue: @magento I am working on this
To learn more about issue processing workflow, refer to the Code Contributions.
Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: 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.
:pencil2: 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. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If the issue has a valid description, the label Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description
label to the issue by yourself.
[ ] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.4-develop
branchDetails
- Add the comment @magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
[ ] 5. Add label Issue: Confirmed
once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Hi @DuckThom , Thank you for reporting and collaboration. As per Magento devdocs , Graphql supports only below shipping methods by default. and none of the shipping methods have underscore in carrier code to reproduce the issue. Also sendcloud is a 3rd party package and code of the extension is not part of Magento git repository. Community cannot able to provide fix for it in this repository. All questions, issue reports and fix for them should be addressed to the corresponding extension owners(support) on the Magento Market place page. Kindly recheck the issue on Magento 2.4-develop instance with Graphql supported shipping methods and provide missing steps if the issue is still reproducible. Thank you.
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 , Verified the issue again on Magento 2.4-develop instance using custom shipping method using both with / without underscore in carrier code and the issue is reproducible. Hence updating the description and confirming the issue. Scenario 1: Custom shipping method created without underscore in carrier code. No issue. Graphql response retrieved as expected. Method displayed in "available_shipping_methods" and "selected_shipping_method"
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".
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-7550 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-November. Thank you for verifying the issue.
Issue Available: @engcom-November, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
:x: You don't have permission to export this issue.
@magento I am working on this
Hi @DuckThom , Development team is currently working on this issue. Thank you.
Hello,
As I can see this issue got fixed in the scope of the internal Jira ticket AC-7550 by the internal team Related commits: https://github.com/magento/magento2/search?q=AC-7550&type=commits
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:
https://github.com/magento/magento2/blob/ea0cf6395753078e45af8c4a5ddc1ea2c4d91092/app/code/Magento/QuoteGraphQl/Model/Resolver/ShippingAddress/SelectedShippingMethod.php#L53
This will split on the first underscore, which is not correct.
Possible solution:
Release note
No response
Triage and priority