Closed tommi-martin closed 2 years ago
Hi @tommi-martin. 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.
:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
Hi @engcom-Delta. 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 @tommi-martin, Tried to reproduce it on Magento 2.4 Develop latest branch , order has cancelled successfully, while cancelling getting error "You have not cancelled the item" Please find the attached screenshots & video for reference.
Hello @engcom-Delta Thank you for your attention towards this matter. In the recording did you perhaps check the exception that caused the error message to be printed? It originates from the cancel controller's try catch logic and if I gave you my instructions right, the actual exception should be the mysql query error in the original description, while the message shown to user is inaccurate.
\Magento\Sales\Controller\Adminhtml\Order\Cancel::execute
try {
$this->orderManagement->cancel($order->getEntityId());
$this->messageManager->addSuccessMessage(__('You canceled the order.'));
} catch (\Magento\Framework\Exception\LocalizedException $e) {
$this->messageManager->addErrorMessage($e->getMessage());
} catch (\Exception $e) {
$this->messageManager->addErrorMessage(__('You have not canceled the item.'));
$this->_objectManager->get(\Psr\Log\LoggerInterface::class)->critical($e);
}
I suspect the exception behind that particular error message is the same as I had in the development of my payment module on the frontend side of things. Which I will cover up with a similar try catch, however shouldn't the original issue be addressed?
Hi @engcom-Hotel. 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.
Hello @tommi-martin,
We have tried to reproduce the issue in the Magento 2.4-develop branch and we are unable to reproduce the issue. It may be possible the issue has been fixed in this branch. We are able to cancel the order without any issue. For us the message queue is inactive.
Please have a look at the below screenshot for reference:
We request you to try to reproduce the issue in the Magento 2.4-develop branch and let us know if it is still reproducible for you.
Thanks
I manage a high-traffic Magento site using the Cybersource payment gateway, and am seeing this issue frequently in relation to 3DSecure. If the 3DSecure authentication fails, cybersource is throwing an error which causes the sales coupon to be cancelled.
In addition to the SQL error, we are having significant issues with customers re-trying the payment and finding their coupon has reportedly been used (becuase the coupon was decremented, but the increment was still in queue). Our customer services team are having to manually refund several missed coupons per day due to the customer confusion this is causing.
Any progress here would be much appreciated.
Hello @tommi-martin @braders,
Have you tried to reproduce the issue in Magento 2.4-develop branch? It seems that the is already fixed in this branch.
Thanks
Dear @tommi-martin,
We have noticed that this issue has not been updated for a period of 14 Days. Hence we assume that this issue is fixed now, so we are closing it. Please raise a fresh ticket or reopen this ticket if you need more assistance on this.
Regards
In Magento 2.4.3 a commit introduced asynchronous incrementation to the sales rule coupon usage system in task MC-29335. However this implementation did not modify the decrement logic, which can lead to database error when coupon usage is being decremented during order cancellation. I would expect that this error is quite rare on actual production servers, however it makes testing and developing payment methods a headache.
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
Actual result (*)
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.