[仅限PaaS]{class="badge informative" title="仅适用于云项目(Adobe管理的PaaS基础架构)和内部部署项目上的Adobe Commerce 。"}
ACSD-60326:对客户Returns状态的GraphQL查询出错
ACSD-60326修补程序修复了GraphQL查询客户Returns状态时出现错误的问题。 安装Quality Patches Tool (QPT) 1.1.51时,此修补程序可用。 修补程序ID为ACSD-60326。 请注意,该问题计划在Adobe Commerce 2.4.8中修复。
受影响的产品和版本
为Adobe Commerce版本创建了修补程序:
- Adobe Commerce(所有部署方法) 2.4.6-p2
与Adobe Commerce版本兼容:
- Adobe Commerce(所有部署方法) 2.4.4 - 2.4.7-p2
magento/quality-patches包更新到最新版本,并在Quality Patches Tool:搜索修补程序页面上检查兼容性。 使用修补程序ID作为搜索关键字来查找修补程序。问题
GraphQL对客户Returns状态的查询出错。
重现步骤:
-
使用示例数据初始化新实例。
-
在 Admin 侧边栏上,转到 Stores > Settings > Configuration > Sales > RMA Settings,并将 Enable RMA on Storefront 设置为 是。
-
转到 Sales > Shipping Settings > Origin 并填写地址。
-
更改客户
roni_cost@example.com的密码。 -
登录到管理面板,为客户
roni_cost@example.com订购以下产品:- WSH12-32-Red
- WSH12-32 — 紫色
- WSH12-32 — 绿色
-
为此订单创建一个 Invoice 和 Shipment。
-
选择 Create Returns。
-
转到 Return Items > Add Items 并:
-
选择 WSH12-32-Red 和 WSH12-32-Purple
-
单击 Add Selected Products to returns:
- 设置 Requested = 1
- 将 Return Reason 设置为 服务
- 将 Item Condition 设置为 已打开
- 将 Resolution 设置为 退款
-
单击 Submit Returns。
-
-
打开 Returns 并选择左侧的 Return Items。
- 为两个产品设置 Authorized = 1
- 将 Status 设置为 WSH12-32-Purple 的 Authorized
- 将 Status 设置为 WSH12-32-Red 的 拒绝
- 单击 Save
-
创建具有相同产品的新订单。
-
为相同产品创建 Invoice、Shipment 和 Returns。 授权并继续,直到Returns进程结束。
-
使用以下GraphQL查询生成客户令牌:
code language-graphql mutation { generateCustomerToken(email: "roni_cost@example.com", password: "password") { token } } -
使用收到的令牌进行授权并执行以下查询:
code language-none { customer { returns(pageSize: 20, currentPage: 1) { total_count items { uid number status created_at } } } }
预期的结果:
查询未显示任何错误。 第二次返回的状态不是 null。
实际结果:
查询返回内部服务器错误:
{
"errors": [
{
"message": "Internal server error",
"locations": [
{
"line": 8,
"column": 5
}
],
"path": [
"customer",
"returns",
"items",
1,
"status"
]
}
],
"data": {
"customer": {
"returns": {
"total_count": 2,
"items": [
{
"uid": "MQ==",
"number": "000000001",
"status": "PARTIALLY_AUTHORIZED",
"created_at": "2024-07-09 10:35:55"
},
{
"uid": "Mg==",
"number": "000000002",
"status": null,
"created_at": "2024-07-09 10:50:02"
}
]
}
}
}
}
应用修补程序
要应用单独的修补程序,请根据您的部署方法使用以下链接:
- Adobe Commerce或Magento Open Source内部部署: Quality Patches Tool 指南中的>使用情况Quality Patches Tool。
- 云基础架构上的Adobe Commerce:云基础架构上的Commerce指南中的升级和修补程序>应用修补程序。
相关阅读
要了解有关Quality Patches Tool的更多信息,请参阅:
- Quality Patches Tool 已发布:支持知识库中用于自助提供高质量修补程序的新工具。
- 使用 Quality Patches Tool指南中的Quality Patches Tool检查修补程序是否可用于您的Adobe Commerce问题。
有关QPT中其他可用修补程序的信息,请参阅Quality Patches Tool指南中的:搜索修补程序Quality Patches Tool。