-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
#9699 Fix for viewing products when they belong to a taxon and to one… #10070
Conversation
… to one of children taxon
9c02892
to
94b8a15
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But can we also add some products with translations?
@lchrusciel Is it in the behat scenario that you'd like to have a product with translation? |
@laurent35240 I think that is what @lchrusciel meant. Maybe we should check if adding the distinct clause does not affect joining the translations table in any way. |
Yup. I prefer to ensure, that we are not adding any regression. However, there should be some tests for that anyway. |
features/product/viewing_products/viewing_products_from_taxon_and_children.feature
Outdated
Show resolved
Hide resolved
@@ -70,6 +70,7 @@ public function createShopListQueryBuilder( | |||
array $sorting = [] | |||
): QueryBuilder { | |||
$queryBuilder = $this->createQueryBuilder('o') | |||
->distinct() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's so simple when you see it, but couldn't figure it out when I was trying to solve this issue, good job 🎉
Thank you, Laurent! 🎉 |
This PR was merged into the 1.2 branch. Discussion ---------- | Q | A | --------------- | ----- | Branch? | 1.2 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Related tickets | introduced in #10070, replaces #10114 and #10134, fixes #7389 | License | MIT Based on a PR by @yohang (thank you for your work!). The test was failing, as there is another bug with setting max results with paginator (that's why I've reduced the amount of products in the scenario) 🚀 😄 But the 500 error bug is fixed (I've also checked it manually). Commits ------- e229211 Added productTaxon to product list query to prevent an SQL error 261236e Quick fix for the scenario
… of children taxon