Skip to content
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

Rating Summary in Graphql return wrong rating_summary in multistores website #39703

Closed
5 tasks
zexperto opened this issue Mar 5, 2025 · 13 comments
Closed
5 tasks
Assignees
Labels
Issue: needs update Additional information is require, waiting for response Reported on 2.4.5-p11 Indicates original Magento version for the Issue report.

Comments

@zexperto
Copy link

zexperto commented Mar 5, 2025

Preconditions and environment

  • Magento version: 2.4.5-p11
  • scope: Graphql
  • Multistore with two languages

Steps to reproduce

  1. Create two Storeviews (English and French)
  2. Create simple product (or any type)
  3. Create new Customer
  4. Add review in French by that customer to the above created Product
  5. get the reviews for that product in graphql
  • When calling rating_summary in graphql and you have two stores, one is English and the other one is French, the query return all reviews in all store views but the rating summary return the summary in one store and it looks like it is hardcoded too

Expected result

you should either get all reviews and the correct rate_summary or you get the filtered reviews by the store and the correct rate_summary

Actual result

you get wrong rate_summary because there is a filter in this class per store id
Class: Magento\ReviewGraphQl\Model\Resolver\Product\RatingSummary

Line 85: $summary = $this->summaryFactory->create()->setStoreId($store->getId())->load($product->getId());
but the filter is not applied in the reviews

Additional information

query Products { products(filter: { sku: { eq: "{sku}" } }) { items{ rating_summary review_count reviews { items { text } } } } }
No response

Release note

GrqphQl query

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Copy link

m2-assistant bot commented Mar 5, 2025

Hi @zexperto. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce.


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 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.

@engcom-Bravo engcom-Bravo self-assigned this Mar 5, 2025
Copy link

m2-assistant bot commented Mar 5, 2025

Hi @engcom-Bravo. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • 4. Verify that the issue is reproducible on 2.4-develop branch
    Details- If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
  • 5. Add label Issue: Confirmed once verification is complete.
  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Bravo engcom-Bravo added the Reported on 2.4.5-p11 Indicates original Magento version for the Issue report. label Mar 5, 2025
@engcom-Bravo
Copy link
Contributor

Hi @zexperto,

Thanks for your reporting and collaboration.

We have tried to reproduce the issue in latest 2.4-develop instance and the issue is not reproducible.kindly refer the screenshots.

Image

Image

We are getting the rating_summary.Could you please let us know if we are missing anything and also elaborate the steps to reproduce if possible please provide screenshots as well.

Thanks.

@engcom-Bravo engcom-Bravo added the Issue: needs update Additional information is require, waiting for response label Mar 5, 2025
@zexperto
Copy link
Author

zexperto commented Mar 5, 2025

@engcom-Bravo sorry I thought I added the graphql query, here is the query that I use

query Products { products(filter: { sku: { eq: "100354" } }) { items{ rating_summary review_count reviews { items { text } } } } }

@engcom-Bravo
Copy link
Contributor

Hi @zexperto,

Thanks for your update.

We have tried We have tried to reproduce the issue in latest 2.4-develop instance and the issue is not reproducible.kindly refer the screenshots.

Image

Image

we are getting all reviews and the correct rate_summary.Could you please let us know if we are missing anything.

Thanks.

@zexperto
Copy link
Author

zexperto commented Mar 6, 2025

@engcom-Bravo I am not sure if you already have this setup but my setup is like this
1- all reviews are in French
2- I am calling my query in the English store by pasing store = en in the header

@zexperto
Copy link
Author

zexperto commented Mar 6, 2025

@magento I am working on this

Copy link

m2-assistant bot commented Mar 6, 2025

Hi @zexperto! 👋
Thank you for collaboration. Only members of Community Contributors Team are allowed to be assigned to the issue. Please use @magento add to contributors team command to join Contributors team.

@zexperto
Copy link
Author

zexperto commented Mar 6, 2025

@magento add to contributors team

Copy link

m2-assistant bot commented Mar 6, 2025

Hi @zexperto! 👋
Thank you for joining. Please accept team invitation 👉 here 👈 and add your comment one more time.

@zexperto
Copy link
Author

zexperto commented Mar 6, 2025

@magento-engcom-team give me 2.4.5 instance

@engcom-Bravo
Copy link
Contributor

Hi @zexperto,

Thanks for your update.

We have tried to reproduce the issue in Latest 2.4-develop instance and we are not able to reproduce the issue.Kindly refer the screenshots.

when we are passing store code for English we are getting english store reviews only.

Image Image

when we are passing store code for French we are getting french store reviews only.

Image Image

Could you please let us know if we are missing anything.

Thanks.

@zexperto
Copy link
Author

zexperto commented Mar 7, 2025

@engcom-Bravo Thank you for your effort I am going to close this ticket as it might be because an old data with wrong details in our side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: needs update Additional information is require, waiting for response Reported on 2.4.5-p11 Indicates original Magento version for the Issue report.
Projects
None yet
Development

No branches or pull requests

2 participants