-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Issue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedProgress: doneProject: GraphQL
Milestone
Description
Preconditions (*)
- Magento 2.3.4
- 2 Storeviews
- Demo data
Steps to reproduce (*)
- Pick an attribute and configure it so its available as an aggregation in graphql (I chose "size")
- Set the attribute label for both storeviews

- Set the attribute option labels for both storeviews

- Run the following GraphQl query for both storeviews:
query products {
products (filter: {
category_id: {eq: "2"}
}
) {
aggregations {
attribute_code
label
options{
count
label
value
}
}
}
}
Expected result (*)
For default storeview
...
{
"attribute_code": "size",
"label": "default",
"options": [
{
"count": 1,
"label": "55 cm default",
"value": "5518"
},
{
"count": 1,
"label": "65 cm default",
"value": "5519"
},
{
"count": 1,
"label": "default",
"value": "5520"
},
{
"count": 2,
"label": "default",
"value": "5521"
},
{
"count": 2,
"label": "default",
"value": "5522"
},
{
"count": 2,
"label": "default",
"value": "5523"
},
{
"count": 97,
"label": "XS default",
"value": "5594"
},
{
"count": 98,
"label": "default",
"value": "5595"
},
{
"count": 98,
"label": "default",
"value": "5596"
},
{
"count": 98,
"label": "default",
"value": "5597"
},
{...}
]
},
...
Actual result (*)
For default storeview
...
{
"attribute_code": "size",
"label": "Size",
"options": [
{
"count": 1,
"label": "55 cm notdefault",
"value": "5518"
},
{
"count": 1,
"label": "65 cm notdefault",
"value": "5519"
},
{
"count": 1,
"label": "notdefault",
"value": "5520"
},
{
"count": 2,
"label": "notdefault",
"value": "5521"
},
{
"count": 2,
"label": "notdefault",
"value": "5522"
},
{
"count": 2,
"label": "notdefault",
"value": "5523"
},
{
"count": 97,
"label": "XS notdefault",
"value": "5594"
},
{
"count": 98,
"label": "notdefault",
"value": "5595"
},
{
"count": 98,
"label": "notdefault",
"value": "5596"
},
{
"count": 98,
"label": "notdefault",
"value": "5597"
},
{...}
]
},
...
What is happening is that the attribute label is never translated. And the attribute option labels pick the last entry in the database for each label. In my case "notdefault" because I entered those last.
I checked the code and at no point is the $storeId checked in the queries that gather the results.
Metadata
Metadata
Assignees
Labels
Issue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedProgress: doneProject: GraphQL