-
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
Fixed #26345 Reorder in Admin panel leads to report page in case of changed product custom option max characters #26348
Fixed #26345 Reorder in Admin panel leads to report page in case of changed product custom option max characters #26348
Conversation
Update Reorder.php so that it can handle the Localized Exception and added try catch block
Hi @cedmudit. Thank you for your contribution
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 @cedmudit. Thank you for your contribution. Could I kindly ask you to cover your change using an automated test? I would recommend a unit test or MFTF test in this particular case.
Also, consider checking the failing static tests as well.
Thank you!
I will take care of test coverage. |
… 2.3-developPR26345
4157d97
to
43f9e2b
Compare
@magento run functional tests |
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.
It looks like the reorder functionality for MSI has been affected by this change. Please, take a look at the failing functional tests.
@magento run all tests |
Looks like they were just fluky tests |
$this->_getSession()->setUseOldShippingMethod(true); | ||
$this->_getOrderCreateModel()->initFromOrder($order); | ||
$resultRedirect->setPath('sales/*'); | ||
} catch (\Magento\Framework\Exception\LocalizedException $e) { |
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 @cedmudit. I've noticed that we don't log the exception. It's not that critical in case of LocalizedException
since we show the message using the messageManager
. However, it's still recommended to log the exception.
In the case of catching \Exception
it's very important to have the details in the error log. Otherwise, we just catch the exception and hide important error details.
Please, add error logging for both cases. Thank you!
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, @rogyar. I will add an error logging.
Pull Request state was updated. Re-review required.
The failing tests are not related to the current PR since we have the same tests failing for other PRs |
Hi @rogyar, thank you for the review. |
✔️ QA passed |
Failed functional tests not related to the changes in this PR |
… in case of changed product custom option max characters #26348
Hi @cedmudit, thank you for your contribution! |
Fixed #26345 Reorder in Admin panel leads to report page in case of changed product custom option max characters
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
The Admin user see a clear error message, that explains, why the order couldn't reordered.
Probably it's enough to implement it in the same way as on frontend for registered customer:
registered customer - reorder after changing max characters - error message
Actual result (*)
The Admin user see a report page
Description (*)
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)