我使用Magento 2.4.4与PWA studio 12.5.0。
PLP(分类页面工作正常)但PDP页面将用户重定向到404。不确定发生了什么& &;我需要找的地方。我附加了一些我在浏览器控制台发现的日志&线上购物下
控制台日志:-
{“errors”:[{“debugMessage”:“Expected a value of type “Int” but received: PRODUCT”,“message”:“Internal server error”,“extensions”:{“category”:“internal”},“locations”:[{“line”:1,“column”:75}],“path”:[“route”,“type”]}],“data”:{“route”:{“relative_url”:“url-product-1.html”,“redirect_code”:0,“type”:null,“uid”:“MTA4ODA4OA==“,”__typename”:“SimpleProduct”}}}
Magento调试日志:-
==> debug.log <==
[2022-07-06T18:09:47.677613+00:00] report.ERROR: Expected a value of type "Int" but received: PRODUCT
GraphQL (1:75)
1: query ResolveURL($url:String!){route(url:$url){relative_url redirect_code type ...on CmsPage{identifier __typename}...on ProductInterface{uid __typename}...on CategoryInterface{uid __typename}__typename}}
感谢您的帮助
更多细节
{errors: [{debugMessage: "Expected a value of type "Int" but received: PRODUCT",…}], data: {,…}}
data: {,…}
route: {relative_url: "epoxy-acrylic-resin-hazmat-item.html", redirect_code: 0, type: null, uid: "OTY2MTk=",…}
redirect_code: 0
relative_url: "producturl.html"
type: null
uid: "OTY2MTk="
__typename: "SimpleProduct"
errors: [{debugMessage: "Expected a value of type "Int" but received: PRODUCT",…}]
0: {debugMessage: "Expected a value of type "Int" but received: PRODUCT",…}
debugMessage: "Expected a value of type "Int" but received: PRODUCT"
extensions: {category: "internal"}
locations: [{line: 1, column: 75}]
message: "Internal server error"
path: ["route", "type"]
我找到的另一个日志可能有助于解决这个问题
[GraphQL error]: Message: Internal server error, Location: [object Object], Path: route,type
您使用Magento社区版吗?
如果是,请更改In packagesvenia-concept .env
将值改为MOS
MAGENTO_BACKEND_EDITION =金属氧化物半导体在
之后,您可以搜索"在config . php,
启用这些模块,因此您现在应该能够在购物车中添加产品。