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
OptionValueProvider class get() method contains an incorrect query value #35910
Comments
Hi @LukasDeRuiter. Thank you for your report.
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:
For more details, review the Magento Contributor Assistant documentation. Add a comment to assign the issue: To learn more about issue processing workflow, refer to the Code Contributions.
🕙 You can find the schedule on the Magento Community Calendar page. 📞 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. ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
Hi @engcom-Hotel. Thank you for working on this issue.
|
Hello @LukasDeRuiter, Thanks for the report and collaboration! We have tried to reproduce the issue in Magento 2.4-develop branch but were unable to do so. We can see the Let us know in case we have missed anything. Thanks |
Dear @LukasDeRuiter, 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 |
Hi, I can confirm @LukasDeRuiter's report.
ProblemI struggled to understand why this class was introduced in the core and commits aren't helpufl in that sense. Moreover, there is no usage of this class in Magento OpenSource (on
It however is used in Adobe Commerce, by the RMA GraphQL module:
As a consequence, the RMA GraphQL module doesn't work. To reproduceInstall Adobe Commerce with sample data. Remove the following line in the DB ( Try to create a return using the What happensGraphQL returns an error due to The error is:
ExpectedIt should accept the return request and save it. NextI'll submit a PR to change this value, and see if no regression is detected by the Magento OpenSource test suite. |
Hello @real34, Thanks for the contribution! We are reopening this issue for further processing. We have a query here, in your comment you have mentioned the mutation And also can you please tell us your mutation query? Thanks |
Hi @engcom-Hotel, It indeed is mutation RequestReturnMutation($input: RequestReturnInput!) {
requestReturn(input: $input) {
return {
order {
id
}
}
}
} |
Hello @real34, Thanks for the response! Based on your comment, we have tried to reproduce the issue in Magento 2.4-develop branch. And the issue is reproducible for us. It seems that there is a mismatch in comment vs functionality. In the comment, it is written that the Hence confirming the issue and updating the description. Thanks |
Hi @LukasDeRuiter , |
Hello, As I can see this issue got fixed in the scope of the internal Jira ticket AC-6680 by the internal team Based on the Jira ticket, the target version is 2.4.7-beta1. Thanks |
Preconditions and environment
Steps to reproduce
Install Adobe Commerce with sample data.
Remove the following line in the DB (
DELETE FROM eav_attribute_option_value WHERE
eav_attribute_option_value.
value_id= 221
):Try to create a return using the
RequestReturnMutation
GraphQL mutation with "Reason: Wrong Color".What happens
GraphQL returns an error due to
Magento\RmaGraphQl\Model\Rma\Item::Builder
calling the method with an option_id value (if ($this->optionValueProvider->get((int)$attributeValue)) {
).The error is:
Expected result
This method should return an attribute option value based on the given option_id.
Actual result
This method returns only an error, as the 'value_id' column is not present.
Additional information
This issue can be fixed by changing the the first parameter name to '$optionId', and changing the first parameter of the ->where method to 'option_id'. Code as example:
private function get(int $optionId): ?string
{
$select = $this->connection->select()
->from($this->connection->getTableName('eav_attribute_option_value'), 'value')
->where('option_id = ?', $optionId);
Kind regards,
Lukas de Ruiter
Youwe B.V.
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: