-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Fix wrong format error DHL shipping label #31021
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
Fix wrong format error DHL shipping label #31021
Conversation
Fix "The response is in wrong format." error while generating dhl shipping label. When product name has unicode characters substr() is sending � in <PieceContents> causing erros dhl syntax errors.
Hi @vpsnak. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
Hi @vpsnak, thank you for your contribution! |
Hi @vpsnak. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @vpsnak. Thank you for your collaboration. According to the definition of done all changes should be covered by auto-tests. Could I ask you to cover this case with an integration test, please? Feel free to extend the existing test for that.
Thank you!
@magento create issue |
Hello @vpsnak. |
@engcom-Hotel @rogyar i have never made an Automated test, i am searching on how to cover this issue with a test case because its a tricky situation. I have to test _shipmentDetails in order to test the difference between substr(implode(',', $content), 0, 34) and $this->string->substr(implode(',', $content), 0, 34) on line 1751? Or can i make a test just passing the same string to both and test the result? |
@magento run all tests |
@magento run all tests |
@magento run all tests |
@magento run Functional Tests B2B |
@magento run Functional Tests EE |
@magento run all tests |
Hi @rogyar, thank you for the review.
|
✔️ QA Passed Case 1.With product name "Φυστίκι Ψημένο με Αλάτι Συσκευασία"
Before: ❌ while requesting label creation we get "The response is in wrong format." After: ✔️ The shipment has been created ✔️ With Documents and Non Documents types Case 2.With product name "Simple 1"
Before: ❌ while requesting label creation we get "The response is in wrong format." After: ✔️ The shipment has been created ✔️ With Documents and Non Documents types |
Hi @vpsnak, thank you for your contribution! |
Fix "The response is in wrong format." error while generating dhl shipping label. When product name has unicode characters substr() is sending � in causing erros dhl syntax errors.
Description (*)
DHL shipping.log produces error "Error in parsing request XML:The element type "PieceContents" must be terminated by the matching end-tag "</PieceContents>"."
This is caused in our use case by substr() not supporting multibyte characters in product name.
Manual testing scenarios (*)
Contribution checklist (*)
Resolved issues:
Related Pull Requests