Closed
Description
This issue is automatically created based on existing pull request: #31021: Fix wrong format error DHL shipping label
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.
Preconditions
- Magento 2.4-develop
- Magento DHL settings and Store Settings set for USA address
- A Customer with a valid United Kingdom address
Steps to reproduce (*)
- create a product with product name "Φυστίκι Ψημένο με Αλάτι Συσκευασία"
- place an order with dhl shipping method (having debug mode will help trace dhl error response)
- try to ship order with "create shipping label" checkbox checked
- while requesting label creation you get "The response is in wrong format."
Expected result
Shipping Label should be created
Actual Result
"The response format is wrong" error message appears
Note from Engcom ❗
We are able to get the error message with a product named Product
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.4-develop branchGate 3 Passed. Manual verification of the issue completed. Issue is confirmedA defect with this priority could have functionality issues which are not to expectations.The issue has been reproduced on latest 2.4-develop branchMajor restrictions or short-term circumventions are required until a fix is available.
Type
Projects
Status
Done